import{_ as b}from"./ListTableActionLabel.vue_vue_type_script_setup_true_lang-BIAl7X25.js";import{u as p}from"./useAuthAbilities-Cb-lR8-z.js";import{_ as g}from"./AppLayout.vue_vue_type_script_setup_true_lang-BwuDxc8O.js";import{d as k,o as s,a,b as i,e,h as w,w as n,f as t,g as u,l as c,i as N,j as m,F as f,n as G,t as l}from"./app-bWy6VYs1.js";import{g as d}from"./index-DTehe-pt.js";import{S as v}from"./square-pen-VTID55Gt.js";import"./index-C32fBP6Q.js";import"./index-CMWG4mbA.js";import"./useForwardExpose-Cx2E44RD.js";import"./VisuallyHidden-0BfmsMPn.js";import"./RovingFocusGroup-D20OvR_w.js";import"./useArrowNavigation-C6Y-ieo6.js";import"./_plugin-vue_export-helper-DmjF0He4.js";const A={class:"flex items-center justify-between gap-3 p-4"},B={class:"p-4"},C={class:"min-w-full border"},S={class:"p-2 font-medium"},V={class:"p-2 text-sm text-gray-600"},j={class:"p-2"},E={key:0,class:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-red-100 text-red-800"},D={key:1,class:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-gray-100 text-gray-800"},F={class:"p-2"},T={class:"p-2 text-right"},W=k({__name:"Index",props:{groups:{}},setup(_){const x=_,h=p("groups","create"),y=p("groups","edit");return($,r)=>(s(),a(f,null,[i(e(w),{title:"Groups"}),i(g,{breadcrumbs:[{title:"Groups",href:e(d).index().url}]},{default:n(()=>[t("div",A,[r[1]||(r[1]=t("div",null,null,-1)),e(h)?(s(),u(e(c),{key:0,href:e(d).create().url,class:"rounded bg-blue-600 px-3 py-2 text-white"},{default:n(()=>[...r[0]||(r[0]=[N("New Group",-1)])]),_:1},8,["href"])):m("",!0)]),t("div",B,[t("table",C,[r[2]||(r[2]=t("thead",null,[t("tr",{class:"bg-gray-50"},[t("th",{class:"p-2 text-left"},"Name"),t("th",{class:"p-2 text-left"},"Description"),t("th",{class:"p-2 text-left"},"Type"),t("th",{class:"p-2 text-left"},"Users"),t("th",{class:"p-2 text-right"},"Actions")])],-1)),t("tbody",null,[(s(!0),a(f,null,G(x.groups,o=>(s(),a("tr",{key:o.id,class:"border-t"},[t("td",S,l(o.name),1),t("td",V,l(o.description||"-"),1),t("td",j,[o.is_administrator?(s(),a("span",E," Administrator ")):(s(),a("span",D," Standard "))]),t("td",F,l(o.users_count),1),t("td",T,[e(y)?(s(),u(e(c),{key:0,href:e(d).edit(o.id).url,class:"inline-flex items-center justify-center rounded border px-2 py-1.5 md:px-3 md:py-1 text-sm font-medium text-gray-700 hover:bg-gray-50"},{default:n(()=>[i(b,{label:"Edit"},{default:n(()=>[i(e(v),{class:"h-4 w-4"})]),_:1})]),_:1},8,["href"])):m("",!0)])]))),128))])])])]),_:1},8,["breadcrumbs"])],64))}});export{W as default};
