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