import{_ as g}from"./AdminLayout-DeT_GLTC.js";import{d as w,s as x,m as k,f as e,r as v,y,c,o as n,b as l,a as t,e as C,t as s,u as a,F as I,g as A,l as D,n as p,w as F}from"./app-Do7K7VDV.js";import{_ as $}from"./Paginate-BZTS8QtF.js";import{h as B}from"./moment-BAtM24Ew.js";import{_ as z}from"./NoDataFound-oJx-Mfyi.js";import{_ as L}from"./FilterDropdown-HyKaUaTA.js";import"./AssetModal-C18ToIEK.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./InputFieldError-0BmYlL24.js";import"./ToastrContainer-CtYDvNPN.js";import"./SpinnerBtn-C-rqKjUt.js";const M={class:"space-y-6"},O={class:"table-responsive whitespace-nowrap rounded-primary"},T={class:"table"},E={class:"text-right"},N={key:0},S={class:"text-left"},V={class:"h-12 rounded",alt:"icon"},j={class:"text-left"},R={class:"text-left"},Y={class:""},q={class:"dropdown","data-placement":"bottom-start"},G={class:"dropdown-toggle"},H={class:"dropdown-content w-40"},J={class:"dropdown-list"},K={class:"dropdown-list-item"},P={class:"dropdown-list-item"},Q=["onClick"],U=w({layout:g}),dt=Object.assign(U,{__name:"Index",props:["services","total","active","inActive","buttons"],setup(i){const{deleteRow:h}=x(),r=i;k(()=>[{value:r.total,title:e("Total"),iconClass:"bx bx-badge"},{value:r.active,title:e("Active"),iconClass:"bx bx-badge-check"},{value:r.inActive,title:e("Inactive"),iconClass:"bx bx-x-circle"}]);const b=[{label:"Title",value:"title"},{label:"Overview",value:"overview"},{label:"Status",value:"is_active",options:[{label:"Active",value:1},{label:"Inactive",value:0}]},{label:"Is Featured",value:"is_featured",options:[{label:"Active",value:1},{label:"Inactive",value:0}]}];return(_,W)=>{const d=v("Icon"),m=v("Link"),f=y("lazy");return n(),c("div",M,[l(L,{options:b}),t("div",O,[t("table",T,[t("thead",null,[t("tr",null,[t("th",null,s(a(e)("Icon")),1),t("th",null,s(a(e)("Title")),1),t("th",null,s(a(e)("Category")),1),t("th",null,s(a(e)("Is Active")),1),t("th",null,s(a(e)("Is Featured")),1),t("th",null,s(a(e)("Created At")),1),t("th",null,[t("p",E,s(a(e)("Action")),1)])])]),i.services.total?(n(),c("tbody",N,[(n(!0),c(I,null,A(i.services.data,o=>{var u;return n(),c("tr",{key:o.id},[t("td",S,[D(t("img",V,null,512),[[f,o.icon]])]),t("td",null,s(o.title),1),t("td",null,s((u=o.category)==null?void 0:u.title),1),t("td",j,[t("span",{class:p(["badge",o.is_active?"badge-success":"badge-danger"])},s(o.is_active?a(e)("Active"):a(e)("Draft")),3)]),t("td",R,[t("span",{class:p(["badge",o.is_featured?"badge-success":""])},s(o.is_featured?a(e)("Featured"):"-"),3)]),t("td",null,s(a(B)(o.created_at).format("D-MMM-Y")),1),t("td",Y,[t("div",q,[t("div",G,[l(d,{class:"w-30 text-lg",icon:"bi:three-dots-vertical"})]),t("div",H,[t("ul",J,[t("li",K,[l(m,{href:_.route("admin.services.edit",o),class:"dropdown-link"},{default:F(()=>[l(d,{class:"w-30 text-lg",icon:"bx:edit"}),t("span",null,s(a(e)("Edit")),1)]),_:2},1032,["href"])]),t("li",P,[t("button",{as:"button",class:"dropdown-link",onClick:X=>a(h)(_.route("admin.services.destroy",o.id))},[l(d,{class:"w-30 text-lg",icon:"bx:trash"}),t("span",null,s(a(e)("Delete")),1)],8,Q)])])])])])])}),128))])):(n(),C(z,{key:1,"for-table":"true"}))])]),l($,{links:i.services.links},null,8,["links"])])}}});export{dt as default};
