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