1import{a as k}from"./chunk-LBSMHZJP.js";import"./chunk-R72SZMBJ.js";import"./chunk-7LXGD463.js";import{a as V}from"./chunk-KZSNNQWS.js";import{a as L}from"./chunk-SAEPE5PA.js";import{a as j,b as A}from"./chunk-5DITAFZ5.js";import"./chunk-DIHCQ5R5.js";import"./chunk-SM2TTBGO.js";import"./chunk-B7NPS3YI.js";import"./chunk-5UJWKNM7.js";import{a as N,b as T}from"./chunk-6SQSBLSA.js";import"./chunk-3SAMHAPI.js";import"./chunk-ISHFS3BD.js";import"./chunk-4BGAM3F6.js";import"./chunk-HJAXHZCY.js";import"./chunk-JMH322RS.js";import"./chunk-LYQC6MWN.js";import"./chunk-7RKFN77S.js";import{a as U,b as E}from"./chunk-3UFSDNI7.js";import"./chunk-5XHQL7JC.js";import"./chunk-EBGX4HVD.js";import"./chunk-57M7JPEL.js";import{d as b}from"./chunk-J32TI6U5.js";import"./chunk-JSABXLUA.js";import"./chunk-SPKFREUG.js";import"./chunk-2T4ESMYG.js";import{h as I}from"./chunk-KUAJXTJQ.js";import"./chunk-2YMVBJJG.js";import{aa as f}from"./chunk-HAJRU2TR.js";import{Ab as c,Bb as s,Cb as d,Gb as O,Ib as v,Jb as m,O as C,Oc as w,Sa as o,Vb as h,Wb as y,Wc as S,Xa as a,bc as x,cb as M,da as g,ea as p,f as u,ib as P,qb as i}from"./chunk-QCTWED4T.js";import"./chunk-7BXBZ5JU.js";function D(t,_){if(t&1&&(c(0,"div",5),d(1,"p-progressSpinner",6),c(2,"p"),h(3),s()()),t&2){let e=m();o(3),y(e.translate("Loading..."))}}function $(t,_){if(t&1&&(c(0,"div",7),d(1,"p-message",8),s()),t&2){let e=m();o(),i("text",e.error)}}function F(t,_){if(t&1){let e=O();c(0,"div")(1,"app-user-form",9),v("save",function(n){g(e);let l=m();return p(l.onSave(n))})("cancel",function(){g(e);let n=m();return p(n.onCancel())}),s()()}t&2&&(o(),i("user",null)("isEditMode",!1))}var oe=(()=>{class t{constructor(e,r,n,l){this.userManagementService=e,this.messageService=r,this.i18nService=n,this.router=l,this.destroy$=new u,this.isLoading=!1,this.error=null}ngOnInit(){}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}onSave(e){let r=e;this.userManagementService.createUser(r).pipe(C(this.destroy$)).subscribe({next:()=>{this.messageService.add({severity:"success",summary:this.translate("common.severitySuccessLabel"),detail:this.translate("admin.user-created-successfully")}),this.router.navigate(["/app/users"])},error:n=>{this.messageService.add({severity:"error",summary:this.translate("common.severityErrorLabel"),detail:this.translate("admin.failed-to-create-user")})}})}onCancel(){this.router.navigate(["/app/users"])}translate(e){return this.i18nService.translate(e)}static{this.\u0275fac=function(r){return new(r||t)(a(V),a(f),a(I),a(b))}}static{this.\u0275cmp=M({type:t,selectors:[["app-admin-new-user"]],features:[x([f])],decls:6,vars:5,consts:[[3,"title","description"],[1,"user-form-container"],["class","loading-container",4,"ngIf"],["class","error-container",4,"ngIf"],[4,"ngIf"],[1,"loading-container"],["styleClass","w-4rem h-4rem"],[1,"error-container"],["severity","error",3,"text"],[3,"save","cancel","user","isEditMode"]],template:function(r,n){r&1&&(c(0,"app-page-container",0)(1,"div",1),P(2,D,4,1,"div",2)(3,$,2,1,"div",3)(4,F,2,2,"div",4),s(),d(5,"p-toast"),s()),r&2&&(i("title",n.translate("admin.create-user"))("description",n.translate("admin.create-user-description")),o(2),i("ngIf",n.isLoading),o(),i("ngIf",n.error&&!n.isLoading),o(),i("ngIf",!n.isLoading&&!n.error))},dependencies:[S,w,E,U,T,N,A,j,L,k],styles:[".user-form-container[_ngcontent-%COMP%]{width:100%;height:100%;overflow-y:auto}.user-form-container[_ngcontent-%COMP%] .loading-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:50vh;color:#6c757d;gap:1rem}.user-form-container[_ngcontent-%COMP%] .error-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding:2rem}.user-form-container[_ngcontent-%COMP%] .form-content[_ngcontent-%COMP%] .form-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1.5rem;margin-bottom:2rem}.user-form-container[_ngcontent-%COMP%] .form-content[_ngcontent-%COMP%] .form-grid[_ngcontent-%COMP%] .form-field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.user-form-container[_ngcontent-%COMP%] .form-content[_ngcontent-%COMP%] .form-grid[_ngcontent-%COMP%] .form-field.full-width[_ngcontent-%COMP%]{grid-column:1/-1}.user-form-container[_ngcontent-%COMP%] .form-content[_ngcontent-%COMP%] .form-grid[_ngcontent-%COMP%] .form-field[_ngcontent-%COMP%] .form-label[_ngcontent-%COMP%]{font-weight:600;color:#2c3e50;font-size:.9rem}.user-form-container[_ngcontent-%COMP%] .form-content[_ngcontent-%COMP%] .form-grid[_ngcontent-%COMP%] .form-field[_ngcontent-%COMP%] .form-label[_ngcontent-%COMP%] .required[_ngcontent-%COMP%]{color:#e74
1c3c}.user-form-container[_ngcontent-%COMP%] .form-content[_ngcontent-%COMP%] .form-grid[_ngcontent-%COMP%] .form-field[_ngcontent-%COMP%] .checkbox-container[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.user-form-container[_ngcontent-%COMP%] .form-content[_ngcontent-%COMP%] .form-grid[_ngcontent-%COMP%] .form-field[_ngcontent-%COMP%] .checkbox-container[_ngcontent-%COMP%] .checkbox-label[_ngcontent-%COMP%]{font-weight:500;color:#2c3e50;cursor:pointer}.user-form-container[_ngcontent-%COMP%] .form-content[_ngcontent-%COMP%] .form-grid[_ngcontent-%COMP%] .form-field[_ngcontent-%COMP%] small.p-error[_ngcontent-%COMP%]{font-size:.8rem;color:#e74c3c}.user-form-container[_ngcontent-%COMP%] .form-content[_ngcontent-%COMP%] .form-actions[_ngcontent-%COMP%]{display:flex;gap:1rem;justify-content:flex-end;margin-top:2rem;padding-top:1.5rem;border-top:1px solid #e9ecef}.user-form-container[_ngcontent-%COMP%] .form-content[_ngcontent-%COMP%] .form-actions[_ngcontent-%COMP%] .p-button{min-width:120px}@media (max-width: 768px){.user-form-container[_ngcontent-%COMP%] .form-content[_ngcontent-%COMP%] .form-grid[_ngcontent-%COMP%]{grid-template-columns:1fr;gap:1rem}}"]})}}return t})();export{oe as AdminNewUserComponent};
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.