theme.keycloak.v2.admin.resources.assets.CreateClientRole-Cvxcq4bO.js Maven / Gradle / Ivy
import{jsx as i}from"react/jsx-runtime";import{u,a as p,g as C,d as R,e as f,c as b,f as g,F as A,aR as F,k as h,bz as v}from"./main-C7ps2lmX.js";import{R as k}from"./RoleForm-COK3IXcf.js";import"react";import"react-dom";import"./FormAccess-DyLNkc18.js";import"./copy-icon-ACZmDH8e.js";import"./ViewHeader-B7eeFzFA.js";function I(){const{adminClient:a}=u(),{t:l}=p(),o=C({mode:"onChange"}),m=R(),{clientId:e}=f(),{realm:r}=b(),{addAlert:c,addError:d}=g();return i(A,{...o,children:i(k,{form:o,onSubmit:async s=>{const n={...s,name:s.name?.trim(),attributes:{}};try{await a.clients.createRole({id:e,...n});const t=await a.clients.findRole({id:e,roleName:n.name});c(l("roleCreated"),h.success),m(v({realm:r,clientId:e,id:t.id,tab:"details"}))}catch(t){d("roleCreateError",t)}},cancelLink:F({realm:r,clientId:e,tab:"roles"}),role:"manage-clients",editMode:!1})})}export{I as default};
//# sourceMappingURL=CreateClientRole-Cvxcq4bO.js.map
© 2015 - 2025 Weber Informatics LLC | Privacy Policy