import{_ as F}from"./vU4aS4uy.js";import{_ as H}from"./DuhDFJjj.js";import{a as I}from"./Z4eZ-m2s.js";import{O as M,j as u,d as P,e as m,w as _,m as n,o as i,b as t,c as a,t as o,F as R,g as S,G as V,H as x,K as T,f,D as U,E as g}from"./Bgmy51Qv.js";import{u as E}from"./BE7GDBwC.js";import{u as O}from"./CYl1ofbh.js";import"./7pZkuj9N.js";import"./BHvLfWtM.js";import"./hSbGpNHU.js";import"./ByXs6QR-.js";import"./D_7E8SMU.js";import"./DKgjlGGV.js";const j={class:"lite-bold"},A=["value"],G=["innerHTML"],K=["onClick"],q=["onClick"],at={__name:"index",setup(J){const{t:c}=M(),k=u({detail:{title:c("title.det")},created_at:{title:c("category.date")}});u(!1),u([]);const{getStatus:h,getThumbImageURL:y}=E(),{cbList:r,deleteBulk:$,listPageRef:b,setItemList:L,checkAll:p,editNode:C,deleteNode:B}=O();return(s,l)=>{const w=F,D=H,N=I;return s.$can("home_slider","view")?(i(),P(N,{key:0,ref_key:"listPageRef",ref:b,"list-api":"getSiteFeatures","delete-api":"deleteSiteFeature","route-name":"site-features",name:s.$t("title.sf"),gate:"home_slider","order-options":n(k),onDeleteBulk:n($),onList:n(L)},{table:_(({list:v})=>[t("tr",j,[t("th",null,[t("input",{type:"checkbox",onChange:l[0]||(l[0]=(...e)=>n(p)&&n(p)(...e))},null,32)]),t("th",null,o(s.$t("admin.img")),1),t("th",null,o(s.$t("index.title")),1),t("th",null,o(s.$t("category.status")),1),t("th",null,o(s.$t("category.created")),1),l[2]||(l[2]=t("th",null,null,-1))]),(i(!0),a(R,null,S(v,(e,z)=>(i(),a("tr",{key:z},[t("td",null,[V(t("input",{type:"checkbox",value:e.id,"onUpdate:modelValue":l[1]||(l[1]=d=>x(r)?r.value=d:null)},null,8,A),[[T,n(r)]])]),t("td",null,[f(D,{to:`/site-features/${e.id}`},{default:_(()=>[f(w,{class:"mx-w-70x","lazy-src":n(y)(e.image),alt:""},null,8,["lazy-src"])]),_:2},1032,["to"])]),t("td",null,[t("div",{innerHTML:e.detail},null,8,G)]),t("td",{class:U(["status",{active:e.status==1}])},[t("span",null,o(n(h)(e.status)),1)],2),t("td",null,o(e.created),1),t("td",null,[s.$can("home_slider","edit")?(i(),a("button",{key:0,onClick:g(d=>n(C)(e),["prevent"]),class:"lite-btn"},o(s.$t("category.edit")),9,K)):m("",!0),s.$can("home_slider","delete")?(i(),a("button",{key:1,onClick:g(d=>n(B)(e),["prevent"]),class:"delete-btn lite-btn"},o(s.$t("category.delete")),9,q)):m("",!0)])]))),128))]),_:1},8,["name","order-options","onDeleteBulk","onList"])):m("",!0)}}};export{at as default};
