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