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"./Pagination-BRYVDO_a.js";var x={class:`flex flex-col space-y-6`},S={class:`flex items-center justify-between gap-4`},C={class:`w-full max-w-sm`},w={method:`GET`,action:`/placements`},T={class:`relative`},E={class:`overflow-hidden rounded-xl border`},D={class:`w-full text-sm`},O={class:`divide-y`},k={class:`px-4 py-3 font-mono font-medium`},A={class:`px-4 py-3 text-muted-foreground`},j={class:`px-4 py-3 text-xs text-muted-foreground`},M={class:`px-4 py-3 text-right`},N={key:0},P=p({layout:{breadcrumbs:[{title:`Dashboard`,href:v()},{title:`Ads Placement`,href:`/placements`}]},__name:`Index`,props:{placements:{},filters:{}},setup(p){let v=p;return(p,P)=>(e(),t(r,null,[s(d(f),{title:`Ads Placement`}),a(`div`,x,[a(`div`,S,[s(y,{title:`Ads Placement`,description:`Sumber lalu lintas iklan (mis. fb, gl)`}),s(d(_),{"as-child":``},{default:i(()=>[s(d(l),{href:`/placements/create`},{default:i(()=>[s(d(m),{class:`size-4`}),P[0]||=u(` Tambah Placement`,-1)]),_:1})]),_:1})]),a(`div`,C,[a(`form`,w,[a(`div`,T,[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 placement…`,class:`pl-9`},null,8,[`default-value`])])])]),a(`div`,E,[a(`table`,D,[P[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`},`URL`),a(`th`,{class:`px-4 py-3 font-medium text-right`},`Aksi`)])],-1),a(`tbody`,O,[(e(!0),t(r,null,n(v.placements.data,n=>(e(),t(`tr`,{key:n.id,class:`hover:bg-muted/30`},[a(`td`,k,c(n.kode),1),a(`td`,A,c(n.keterangan??`—`),1),a(`td`,j,c(n.url??`—`),1),a(`td`,M,[s(d(_),{"as-child":``,variant:`ghost`,size:`sm`},{default:i(()=>[s(d(l),{href:`/placements/${n.id}/edit`},{default:i(()=>[...P[1]||=[u(`Edit`,-1)]]),_:1},8,[`href`])]),_:2},1024)])]))),128)),v.placements.data.length===0?(e(),t(`tr`,N,[...P[2]||=[a(`td`,{colspan:`4`,class:`px-4 py-8 text-center text-muted-foreground`},`Belum ada placement.`,-1)]])):o(``,!0)])])]),s(b,{links:v.placements.links,from:v.placements.from,to:v.placements.to,total:v.placements.total},null,8,[`links`,`from`,`to`,`total`])])],64))}});export{P as default};