import{_ as P}from"./DuhDFJjj.js";import{a as w,b as N}from"./Z4eZ-m2s.js";import{O as R,j as S,P as V,k as v,d as D,w as l,m as t,o as r,b as e,c as d,t as a,F as E,g as T,G as j,H as F,K as H,e as I,E as M,f as b,J as O}from"./Bgmy51Qv.js";import{u as A}from"./CYl1ofbh.js";import"./7pZkuj9N.js";import"./BHvLfWtM.js";import"./hSbGpNHU.js";import"./ByXs6QR-.js";import"./D_7E8SMU.js";const G={class:"lite-bold"},J=["value"],K={class:"mx-w-300x"},U=["onClick"],oe={__name:"index",setup(q){const{t:c}=R(),_=S({created_at:{title:c("category.date")},email:{title:c("fSale.email")}}),f=V(),k=v(()=>`${f.path.replace(/\/$/,"")}/send-email`),{cbList:i,deleteBulk:g,listPageRef:h,setItemList:y,checkAll:m,deleteNode:$}=A();return(s,o)=>{const x=P,B=N,L=w;return r(),D(L,{ref_key:"listPageRef",ref:h,"list-api":"getSubscribers","delete-api":"deleteSubscriber","route-name":"subscribers",name:s.$t("user.subs"),gate:"subscriber","add-button":!1,"order-options":t(_),onList:t(y)},{"table-top":l(({orderOptions:u})=>[b(B,{"order-by-options":u,class:"mb-20 mb-sm-15",onDeleteBulk:t(g)},{"add-button":l(()=>[b(x,{to:t(k),class:"button primary-btn"},{default:l(()=>[O(a(s.$t("user.sEmail")),1)]),_:1},8,["to"])]),_:2},1032,["order-by-options","onDeleteBulk"])]),table:l(({list:u})=>[e("tr",G,[e("th",null,[e("input",{type:"checkbox",onChange:o[0]||(o[0]=(...n)=>t(m)&&t(m)(...n))},null,32)]),e("th",null,a(s.$t("fSale.email")),1),e("th",null,a(s.$t("category.created")),1),o[2]||(o[2]=e("th",null,null,-1))]),(r(!0),d(E,null,T(u,(n,C)=>(r(),d("tr",{key:C},[e("td",null,[j(e("input",{type:"checkbox",value:n.id,"onUpdate:modelValue":o[1]||(o[1]=p=>F(i)?i.value=p:null)},null,8,J),[[H,t(i)]])]),e("td",null,[e("span",K,a(n.email),1)]),e("td",null,a(n.created),1),e("td",null,[s.$can("subscriber","delete")?(r(),d("button",{key:0,onClick:M(p=>t($)(n),["prevent"]),class:"delete-btn lite-btn"},a(s.$t("category.delete")),9,U)):I("",!0)])]))),128))]),_:1},8,["name","order-options","onList"])}}};export{oe as default};
