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