import{d as f,u as b,o as a,a as i,b as n,e,h as _,w as u,f as r,s as y,v as d,x as c,t as l,j as m,y as k,l as g,i as v,F as w}from"./app-bWy6VYs1.js";import{_ as C}from"./AppLayout.vue_vue_type_script_setup_true_lang-BwuDxc8O.js";import{g as p}from"./index-DTehe-pt.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 V={class:"block"},h={key:0,class:"text-sm text-red-600"},N={class:"block"},B={key:0,class:"text-sm text-red-600"},D={class:"flex items-center space-x-2"},F={key:0,class:"text-sm text-red-600"},G={class:"flex items-center gap-3"},M=["disabled"],K=f({__name:"Create",setup(U){const t=b({name:"",description:"",is_administrator:!1});function x(){t.post(p.store().url)}return(A,s)=>(a(),i(w,null,[n(e(_),{title:"New Group"}),n(C,{breadcrumbs:[{title:"Groups",href:e(p).index().url},{title:"Create",href:"#"}]},{default:u(()=>[r("form",{onSubmit:y(x,["prevent"]),class:"space-y-4 p-4"},[r("label",V,[s[3]||(s[3]=r("span",{class:"mb-1 block"},"Name",-1)),d(r("input",{"onUpdate:modelValue":s[0]||(s[0]=o=>e(t).name=o),class:"w-full rounded border px-3 py-2",required:""},null,512),[[c,e(t).name]]),e(t).errors.name?(a(),i("div",h,l(e(t).errors.name),1)):m("",!0)]),r("label",N,[s[4]||(s[4]=r("span",{class:"mb-1 block"},"Description",-1)),d(r("textarea",{"onUpdate:modelValue":s[1]||(s[1]=o=>e(t).description=o),class:"w-full rounded border px-3 py-2",rows:"3"},null,512),[[c,e(t).description]]),e(t).errors.description?(a(),i("div",B,l(e(t).errors.description),1)):m("",!0)]),r("label",D,[d(r("input",{type:"checkbox","onUpdate:modelValue":s[2]||(s[2]=o=>e(t).is_administrator=o),class:"rounded border-gray-300"},null,512),[[k,e(t).is_administrator]]),s[5]||(s[5]=r("span",{class:"text-sm font-medium"},"Administrator Group",-1)),e(t).errors.is_administrator?(a(),i("div",F,l(e(t).errors.is_administrator),1)):m("",!0)]),s[7]||(s[7]=r("p",{class:"text-xs text-gray-600"}," Administrator groups have access to all administration functions and system settings. ",-1)),r("div",G,[r("button",{disabled:e(t).processing,class:"rounded bg-blue-600 px-4 py-2 text-white"},"Create",8,M),n(e(g),{href:e(p).index().url,class:"rounded border px-4 py-2"},{default:u(()=>[...s[6]||(s[6]=[v("Cancel",-1)])]),_:1},8,["href"])])],32)]),_:1},8,["breadcrumbs"])],64))}});export{K as default};
