import{_ as L}from"./DuhDFJjj.js";import{a as N}from"./Z4eZ-m2s.js";import{u as D,s as P,O as S,j as T,k as V,d as F,e as c,w as _,m as n,o as r,b as e,c as a,t as s,F as E,g as H,G as I,H as M,K as O,f as U,E as k}from"./Bgmy51Qv.js";import{u as j}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"},q={class:"w-50x mx-w-50x"},z=["value"],J={class:"mx-w-300x"},Q=["onClick"],W=["onClick"],ue={__name:"index",setup(X){const x=D(),{setting:f}=P(x),{t:d}=S(),y=T({title:{title:d("index.title")},created_at:{title:d("category.date")}}),g=V(()=>{var t;return((t=f.value)==null?void 0:t.currency_icon)||"$"}),{priceFormat:h}=A(),{cbList:i,deleteBulk:b,listPageRef:p,checkAll:m,editNode:$,deleteNode:v}=j();return(t,l)=>{const w=L,C=N;return t.$can("tax_rule","view")?(r(),F(C,{key:0,ref_key:"listPageRef",ref:p,"list-api":"getTaxRules","delete-api":"deleteTaxRule","route-name":"tax-rules","empty-store-variable":"allTaxRules",name:t.$t("brand.tRule"),gate:"tax_rule","order-options":n(y),onDeleteBulk:n(b),onList:n(p)},{table:_(({list:R})=>[e("tr",G,[e("th",K,[e("input",{type:"checkbox",onChange:l[0]||(l[0]=(...o)=>n(m)&&n(m)(...o))},null,32)]),e("th",null,s(t.$t("index.title")),1),e("th",null,s(t.$t("brand.price")),1),e("th",null,s(t.$t("category.created")),1),l[2]||(l[2]=e("th",null," ",-1))]),(r(!0),a(E,null,H(R,(o,B)=>(r(),a("tr",{key:B},[e("td",q,[I(e("input",{type:"checkbox",value:o.id,"onUpdate:modelValue":l[1]||(l[1]=u=>M(i)?i.value=u:null)},null,8,z),[[O,n(i)]])]),e("td",null,[U(w,{class:"link",to:`/tax-rules/${o.id}`},{default:_(()=>[e("h5",J,s(o.title),1)]),_:2},1032,["to"])]),e("td",null,s(n(h)({type:o.type,price:o.price,icon:n(g)})),1),e("td",null,s(o.created),1),e("td",null,[t.$can("tax_rule","edit")?(r(),a("button",{key:0,onClick:k(u=>n($)(o),["prevent"]),class:"lite-btn"},s(t.$t("category.edit")),9,Q)):c("",!0),t.$can("tax_rule","delete")?(r(),a("button",{key:1,onClick:k(u=>n(v)(o),["prevent"]),class:"delete-btn lite-btn"},s(t.$t("category.delete")),9,W)):c("",!0)])]))),128))]),_:1},8,["name","order-options","onDeleteBulk","onList"])):c("",!0)}}};export{ue as default};
