1import{x as p,ab as c,y as x,z as b,b as j,G as f,H as g,a7 as h,bu as u,I as y,cz as T,j as e,O as I,r as R,T as n}from"./main-C5FkkY_k.js";import{u as l}from"./use-required-params-8gEf_XUH.js";import{u as C}from"./useSuspenseQuery-CiBWQfnL.js";import{B as v,a as m}from"./breadcrumb-DBNiRtTB.js";import{T as q,a as L,b as S}from"./tabs-BLz9dKDZ.js";import{C as $}from"./crupdate-resource-layout-D40yWBZg.js";import"./vendor-sentry-CSC1LWfl.js";import"./useEffectEvent-CHDbs1OK.js";import"./ChevronRight-DjYhlfGE.js";import"./MoreHoriz-MPZcE7HL.js";import"./datatable-page-with-header-layout-tujT8rxt.js";import"./dashboard-layout-context-DrSYpHZQ.js";function z(){const{roleId:o}=l(["roleId"]),{trans:s}=p(),i=c();return x({mutationFn:a=>j.put(`roles/${o}`,a).then(t=>t.data),onSuccess:()=>{f(s(g("Role updated"))),h.invalidateQueries({queryKey:u.roles.invalidateKey}),i("/admin/roles")},onError:a=>b(a)})}const B=[{uri:"",label:{message:"Settings"}},{uri:"users",label:{message:"Members"}}];function G(){const{roleId:o}=l(["roleId"]),s=C(u.roles.get(o)),i=y({defaultValues:{name:s.data.role.name,type:s.data.role.type,description:s.data.role.description,permissions:s.data.role.permissions}}),a=z(),t=T("admin/roles/:roleId/edit/*"),d=t!=null&&t.pathname.endsWith("users")?1:0;return e.jsx($,{isLoading:a.isPending,form:i,onSubmit:r=>{a.mutate(r)},title:e.jsxs(v,{size:"xl",children:[e.jsx(m,{to:"/admin/roles",children:e.jsx(n,{message:"Roles"})}),e.jsx(m,{children:s.data.role.name})]}),tabs:e.jsx(q,{selectedTab:d,children:e.jsx(L,{className:"px-24",children:B.map(r=>e.jsx(S,{elementType:R,to:`/admin/roles/${o}/edit${r.uri?`/${r.uri}`:""}`,children:e.jsx(n,{...r.label})},r.uri))})}),children:e.jsx(I,{})})}export{G as Component}; 2//# sourceMappingURL=edit-role-page-B1f0Dbzp.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.