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