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