import{Kt as e,Q as t,Qt as n,R as r,Tn as i,Y as a,Z as o,at as s,fr as c,i as l,it as u,or as d,r as f,st as p}from"./dist-CoD0k1Bd.js";import{t as m}from"./plus-DrIll_vd.js";import{t as h}from"./search-B4f4vYLn.js";import{t as g}from"./Input-C3DwKNOf.js";import{t as _}from"./button-mN_poAXs.js";import{t as v}from"./routes-BZ4t1sNs.js";import{t as y}from"./Heading-CCd5Tysh.js";import{t as b}from"./badge-n_RZ0blh.js";import{t as x}from"./Pagination-BRYVDO_a.js";var S={class:`flex flex-col space-y-6`},C={class:`flex items-center justify-between gap-4`},w={class:`w-full max-w-sm`},T={method:`GET`,action:`/banks`},E={class:`relative`},D={class:`overflow-hidden rounded-xl border`},O={class:`w-full text-sm`},k={class:`divide-y`},A={class:`px-4 py-3 font-mono font-medium`},j={class:`px-4 py-3 text-muted-foreground`},M={class:`px-4 py-3 text-center`},N={class:`px-4 py-3 text-right`},P={key:0},F=p({layout:{breadcrumbs:[{title:`Dashboard`,href:v()},{title:`Bank`,href:`/banks`}]},__name:`Index`,props:{banks:{},filters:{}},setup(p){let v=p;return(p,F)=>(e(),t(r,null,[s(d(f),{title:`Bank`}),a(`div`,S,[a(`div`,C,[s(y,{title:`Master Bank`,description:`Rekening tujuan pembayaran deposit`}),s(d(_),{"as-child":``},{default:i(()=>[s(d(l),{href:`/banks/create`},{default:i(()=>[s(d(m),{class:`size-4`}),F[0]||=u(` Tambah Bank`,-1)]),_:1})]),_:1})]),a(`div`,w,[a(`form`,T,[a(`div`,E,[s(d(h),{class:`absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground`}),s(d(g),{name:`search`,"default-value":v.filters.search??``,placeholder:`Cari bank…`,class:`pl-9`},null,8,[`default-value`])])])]),a(`div`,D,[a(`table`,O,[F[3]||=a(`thead`,{class:`bg-muted/50 text-left text-xs uppercase text-muted-foreground`},[a(`tr`,null,[a(`th`,{class:`px-4 py-3 font-medium`},`Kode`),a(`th`,{class:`px-4 py-3 font-medium`},`Keterangan`),a(`th`,{class:`px-4 py-3 font-medium text-center`},`Status`),a(`th`,{class:`px-4 py-3 font-medium text-right`},`Aksi`)])],-1),a(`tbody`,k,[(e(!0),t(r,null,n(v.banks.data,n=>(e(),t(`tr`,{key:n.id,class:`hover:bg-muted/30`},[a(`td`,A,c(n.kode),1),a(`td`,j,c(n.keterangan),1),a(`td`,M,[s(d(b),{variant:n.status?`default`:`outline`},{default:i(()=>[u(c(n.status?`Aktif`:`Nonaktif`),1)]),_:2},1032,[`variant`])]),a(`td`,N,[s(d(_),{"as-child":``,variant:`ghost`,size:`sm`},{default:i(()=>[s(d(l),{href:`/banks/${n.id}/edit`},{default:i(()=>[...F[1]||=[u(`Edit`,-1)]]),_:1},8,[`href`])]),_:2},1024)])]))),128)),v.banks.data.length===0?(e(),t(`tr`,P,[...F[2]||=[a(`td`,{colspan:`4`,class:`px-4 py-8 text-center text-muted-foreground`},`Belum ada bank.`,-1)]])):o(``,!0)])])]),s(x,{links:v.banks.links,from:v.banks.from,to:v.banks.to,total:v.banks.total},null,8,[`links`,`from`,`to`,`total`])])],64))}});export{F as default};