import{_ as N}from"./DuhDFJjj.js";import{a as D}from"./Z4eZ-m2s.js";import{O as A,j as P,d as V,w as m,m as l,o as i,b as t,c as r,t as e,F as x,g as F,G as R,H as E,K as H,f as I,D as M,e as p,E as _}from"./Bgmy51Qv.js";import{u as O}from"./CYl1ofbh.js";import{u as U}from"./BE7GDBwC.js";import"./7pZkuj9N.js";import"./BHvLfWtM.js";import"./hSbGpNHU.js";import"./ByXs6QR-.js";import"./D_7E8SMU.js";import"./DKgjlGGV.js";const W={class:"lite-bold"},j=["value"],z={class:""},G={class:"mx-w-300x"},K=["onClick"],S=["onClick"],lt={__name:"index",setup(q){const{t:o}=A(),h=P({title:{title:o("index.title")},default:{title:o("admin.default")},account_name:{title:o("user.name")},account_number:{title:o("admin.accNum")},bank_name:{title:o("user.bank")},branch_name:{title:o("user.branch")},created_at:{title:o("category.date")}}),{getFeatured:k}=U(),{cbList:u,deleteBulk:b,listPageRef:f,setItemList:w,checkAll:d,editNode:$,deleteNode:g}=O();return(a,s)=>{const y=N,C=D;return i(),V(C,{ref_key:"listPageRef",ref:f,"list-api":"getWithdrawalAccounts","delete-api":"deleteWithdrawalAccount","route-name":"withdrawal-accounts",name:a.$t("admin.wAcc"),gate:"withdrawal_account","order-options":l(h),onDeleteBulk:l(b),onList:l(w)},{table:m(({list:B})=>[t("tr",W,[t("th",null,[t("input",{type:"checkbox",onChange:s[0]||(s[0]=(...n)=>l(d)&&l(d)(...n))},null,32)]),t("th",null,e(a.$t("index.title")),1),t("th",null,e(a.$t("admin.default")),1),t("th",null,e(a.$t("user.name")),1),t("th",null,e(a.$t("admin.accNum")),1),t("th",null,e(a.$t("user.bank")),1),t("th",null,e(a.$t("user.branch")),1),s[2]||(s[2]=t("th",null,null,-1))]),(i(!0),r(x,null,F(B,(n,L)=>(i(),r("tr",{key:L},[t("td",null,[R(t("input",{type:"checkbox",value:n.id,"onUpdate:modelValue":s[1]||(s[1]=c=>E(u)?u.value=c:null)},null,8,j),[[H,l(u)]])]),t("td",z,[I(y,{class:"link",to:`/withdrawal-accounts/${n.id}`},{default:m(()=>[t("h5",G,e(n.title),1)]),_:2},1032,["to"])]),t("td",{class:M(["status",{active:n.default===1}])},[t("span",null,e(l(k)(n.default)),1)],2),t("td",null,e(n.account_name),1),t("td",null,e(n.account_number),1),t("td",null,e(n.bank_name),1),t("td",null,e(n.branch_name),1),t("td",null,[a.$can("withdrawal_account","edit")?(i(),r("button",{key:0,onClick:_(c=>l($)(n),["prevent"]),class:"lite-btn"},e(a.$t("category.edit")),9,K)):p("",!0),a.$can("withdrawal_account","delete")?(i(),r("button",{key:1,onClick:_(c=>l(g)(n),["prevent"]),class:"delete-btn lite-btn"},e(a.$t("category.delete")),9,S)):p("",!0)])]))),128))]),_:1},8,["name","order-options","onDeleteBulk","onList"])}}};export{lt as default};
