import{Kt as e,Q as t,Qt as n,R as r,Tn as i,X as a,Y as o,Z as s,at as c,fr as l,i as u,it as d,or as f,r as p,st as m}from"./dist-CoD0k1Bd.js";import{t as h}from"./plus-DrIll_vd.js";import{t as g}from"./button-mN_poAXs.js";import{t as _}from"./routes-BZ4t1sNs.js";import{t as v}from"./Heading-CCd5Tysh.js";import{t as y}from"./badge-n_RZ0blh.js";var b={class:`flex flex-col space-y-6`},x={class:`flex items-center justify-between gap-4`},S={class:`overflow-hidden rounded-xl border`},C={class:`w-full text-sm`},w={class:`divide-y`},T={class:`px-4 py-3 font-medium`},E={key:0,class:`block text-xs text-muted-foreground`},D={class:`px-4 py-3 text-muted-foreground`},O={class:`px-4 py-3 font-mono text-xs text-muted-foreground`},k={class:`px-4 py-3 font-mono text-xs text-muted-foreground`},A={class:`px-4 py-3 text-center tabular-nums`},j={class:`px-4 py-3`},M={class:`flex flex-wrap gap-1`},N={class:`px-4 py-3 text-center`},P={class:`px-4 py-3 text-right`},F={key:0},I=m({layout:{breadcrumbs:[{title:`Dashboard`,href:_()},{title:`Menu`,href:`/menus`}]},__name:`Index`,props:{menus:{},menuTypes:{},groups:{}},setup(m){let _=m;return(m,I)=>(e(),t(r,null,[c(f(p),{title:`Manajemen Menu`}),o(`div`,b,[o(`div`,x,[c(v,{title:`Manajemen Menu`,description:`Kelola menu sidebar dinamis & hak akses grup`}),c(f(g),{"as-child":``},{default:i(()=>[c(f(u),{href:`/menus/create`},{default:i(()=>[c(f(h),{class:`size-4`}),I[0]||=d(` Tambah Menu`,-1)]),_:1})]),_:1})]),o(`div`,S,[o(`table`,C,[I[3]||=o(`thead`,{class:`bg-muted/50 text-left text-xs uppercase text-muted-foreground`},[o(`tr`,null,[o(`th`,{class:`px-4 py-3 font-medium`},`Label`),o(`th`,{class:`px-4 py-3 font-medium`},`Section`),o(`th`,{class:`px-4 py-3 font-medium`},`Route / Link`),o(`th`,{class:`px-4 py-3 font-medium`},`Ikon`),o(`th`,{class:`px-4 py-3 font-medium`},`Urutan`),o(`th`,{class:`px-4 py-3 font-medium`},`Grup`),o(`th`,{class:`px-4 py-3 font-medium text-center`},`Status`),o(`th`,{class:`px-4 py-3 font-medium text-right`},`Aksi`)])],-1),o(`tbody`,w,[(e(!0),t(r,null,n(_.menus,p=>(e(),t(`tr`,{key:p.id,class:`hover:bg-muted/30`},[o(`td`,T,[d(l(p.label)+` `,1),p.parent?(e(),t(`span`,E,`↳ `+l(p.parent.label),1)):s(``,!0)]),o(`td`,D,l(p.section),1),o(`td`,O,l(p.route??p.link??`—`),1),o(`td`,k,l(p.icon??`—`),1),o(`td`,A,l(p.sort_order),1),o(`td`,j,[o(`div`,M,[(e(!0),t(r,null,n(p.groups,t=>(e(),a(f(y),{key:t.id,variant:`secondary`,class:`capitalize`},{default:i(()=>[d(l(t.name),1)]),_:2},1024))),128))])]),o(`td`,N,[c(f(y),{variant:p.status?`default`:`outline`},{default:i(()=>[d(l(p.status?`Aktif`:`Nonaktif`),1)]),_:2},1032,[`variant`])]),o(`td`,P,[c(f(g),{"as-child":``,variant:`ghost`,size:`sm`},{default:i(()=>[c(f(u),{href:`/menus/${p.id}/edit`},{default:i(()=>[...I[1]||=[d(`Edit`,-1)]]),_:1},8,[`href`])]),_:2},1024)])]))),128)),_.menus.length===0?(e(),t(`tr`,F,[...I[2]||=[o(`td`,{colspan:`8`,class:`px-4 py-8 text-center text-muted-foreground`},`Belum ada menu.`,-1)]])):s(``,!0)])])])])],64))}});export{I as default};