 to {
    transform: rotate(359deg);
  }
`,f=n.ZP.div`
  animation: ${m} 2s infinite linear;
`,v=()=>t.createElement(f,null,t.createElement(E.Z,null)),y=async()=>{const{get:O}=(0,i.tg)(),{data:I}=await O("/admin/roles");return I.data},L=({disabled:O,error:I,onChange:j,value:x})=>{const{status:N,data:Y}=(0,l.useQuery)(["roles"],y,{staleTime:5e4}),{formatMessage:U}=(0,g.Z)(),S=I?U({id:I,defaultMessage:I}):"",F=U({id:"app.components.Users.ModalCreateBody.block-title.roles",defaultMessage:"User's roles"}),H=U({id:"app.components.Users.ModalCreateBody.block-title.roles.description",defaultMessage:"A user can have one or several roles"}),V=U({id:"app.components.Select.placeholder",defaultMessage:"Select"}),G=N==="loading"?t.createElement(v,null):void 0;return t.createElement(a.P,{id:"roles",disabled:O,error:S,hint:H,label:F,name:"roles",onChange:M=>{j({target:{name:"roles",value:M}})},placeholder:V,multi:!0,startIcon:G,value:x.map(M=>M.toString()),withTags:!0,required:!0},(Y||[]).map(M=>t.createElement(o.W,{key:M.id,value:M.id.toString()},U({id:`global.${M.code}`,defaultMessage:M.name}))))};L.defaultProps={disabled:!1,error:void 0},L.propTypes={disabled:s().bool,error:s().string,onChange:s().func.isRequired,value:s().array.isRequired},c.Z=L},32720:function(B,c,e){e.d(c,{YM:function(){return l},Rw:function(){return E}});var t=e(24346),a=e(19565);const o={firstname:t.Z_().trim().required(a.I0.required),lastname:t.Z_(),email:t.Z_().email(a.I0.email).lowercase().required(a.I0.required),username:t.Z_().nullable(),password:t.Z_().min(8,a.I0.minLength).matches(/[a-z]/,"components.Input.error.contain.lowercase").matches(/[A-Z]/,"components.Input.error.contain.uppercase").matches(/\d/,"components.Input.error.contain.number"),confirmPassword:t.Z_().min(8,a.I0.minLength).oneOf([t.iH("password"),null],"components.Input.error.password.noMatch").when("password",(n,m)=>n?m.required(a.I0.required):m)};var E={...o,currentPassword:t.Z_().when(["password","confirmPassword"],(n,m,f)=>n||m?f.required(a.I0.required):f),preferedLanguage:t.Z_().nullable()},s={roles:t.IX().min(1,a.I0.required).required(a.I0.required)},l=t.Ry().shape({...o,isActive:t.Xg(),...s})},29439:function(B,c,e){e.d(c,{Z:function(){return o}});var t=e(74512);const a=i=>(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"none",viewBox:"0 0 24 24",...i,children:(0,t.jsx)("path",{fill:"#212134",d:"M24 13.3a.2.2 0 0 1-.2.2H5.74l8.239 8.239a.2.2 0 0 1 0 .282L12.14 23.86a.2.2 0 0 1-.282 0L.14 12.14a.2.2 0 0 1 0-.282L11.86.14a.2.2 0 0 1 .282 0L13.98 1.98a.2.2 0 0 1 0 .282L5.74 10.5H23.8c.11 0 .2.09.2.2v2.6Z"})}),o=a}}]);
