import{_ as L}from"./DuhDFJjj.js";import{a as P}from"./Z4eZ-m2s.js";import{O as D,j as N,d as V,w as p,m as l,o as i,b as t,c as a,t as o,F as v,g as R,G as E,H as F,K as H,f as I,D as M,e as m,E as _}from"./Bgmy51Qv.js";import{u as O}from"./CYl1ofbh.js";import{u as S}from"./BE7GDBwC.js";import"./7pZkuj9N.js";import"./BHvLfWtM.js";import"./hSbGpNHU.js";import"./ByXs6QR-.js";import"./D_7E8SMU.js";import"./DKgjlGGV.js";const U={class:"lite-bold"},j={class:"w-50x mx-w-50x"},z={class:"w-50x mx-w-50x"},A=["value"],G={class:"mx-w-300x"},K=["onClick"],q=["onClick"],nt={__name:"index",setup(J){const{t:r}=D(),k=N({title:{title:r("index.title")},created_at:{title:r("category.date")},status:{title:r("category.status")}}),{getStatus:g}=S(),{cbList:c,deleteBulk:f,listPageRef:h,setItemList:y,checkAll:u,editNode:b,deleteNode:C}=O();return(s,n)=>{const $=L,x=P;return i(),V(x,{ref_key:"listPageRef",ref:h,"list-api":"getProductCollections","delete-api":"deleteProductCollection","empty-store-variable":"allProductCollections","route-name":"product-collections",name:s.$t("brand.prodCol"),"order-options":l(k),gate:"product_collection",onDeleteBulk:l(f),onList:l(y)},{table:p(({list:w})=>[t("tr",U,[t("th",j,[t("input",{type:"checkbox",onChange:n[0]||(n[0]=(...e)=>l(u)&&l(u)(...e))},null,32)]),t("th",null,o(s.$t("index.title")),1),t("th",null,o(s.$t("category.slug")),1),t("th",null,o(s.$t("category.status")),1),t("th",null,o(s.$t("category.created")),1),n[2]||(n[2]=t("th",null," ",-1))]),(i(!0),a(v,null,R(w,(e,B)=>(i(),a("tr",{key:B},[t("td",z,[E(t("input",{type:"checkbox",value:e.id,"onUpdate:modelValue":n[1]||(n[1]=d=>F(c)?c.value=d:null)},null,8,A),[[H,l(c)]])]),t("td",null,[I($,{class:"link",to:`/product-collections/${e.id}`},{default:p(()=>[t("h5",G,o(e.title),1)]),_:2},1032,["to"])]),t("td",null,o(e.slug),1),t("td",{class:M(["status",{active:e.status==1}])},[t("span",null,o(l(g)(e.status)),1)],2),t("td",null,o(e.created),1),t("td",null,[s.$can("product_collection","edit")?(i(),a("button",{key:0,onClick:_(d=>l(b)(e),["prevent"]),class:"lite-btn"},o(s.$t("category.edit")),9,K)):m("",!0),s.$can("product_collection","delete")?(i(),a("button",{key:1,onClick:_(d=>l(C)(e),["prevent"]),class:"delete-btn lite-btn"},o(s.$t("category.delete")),9,q)):m("",!0)])]))),128))]),_:1},8,["name","order-options","onDeleteBulk","onList"])}}};export{nt as default};
