import{a as L,c as x,d as R}from"./chunk-VFX53AYF.js";import{f as s,t as m}from"./chunk-ZVQ5RRLK.js";import{b as T}from"./chunk-TPHZRJVN.js";import{e as A}from"./chunk-L2U5MHO4.js";import{B as b,D as N,Xa as U,o,q as F,r as y,u as S,w as v,z as D}from"./chunk-6PWFR42O.js";import{a as _,b as a}from"./chunk-IGFM5CCE.js";import{ua as g}from"./chunk-TDUJNOEU.js";import{Db as d,dc as n,ec as h,fc as f,gc as C,lb as l,qb as p,wb as i,zd as E}from"./chunk-I3FGJX2C.js";import{d as c,n as M}from"./chunk-INB5GR2I.js";M();var e,k=(e=class{constructor(r,t,u){this._fb=r,this._cdr=t,this._localizationService=u,this.isEdit=!1,this.formReady=new p}ngDoCheck(){this._cdr.markForCheck()}ngOnInit(){this._buildForm(),this.formReady.emit(this.companyForm),this.companyForm.valueChanges.pipe(a(this)).subscribe(()=>this._cdr.markForCheck()),this.companyForm.statusChanges.pipe(a(this)).subscribe(()=>this._cdr.markForCheck())}_buildForm(){this.companyForm=this._fb.group({name:this._fb.nonNullable.control(this.initialValue?.name??"",[o.required,o.minLength(s.min),o.maxLength(s.max)]),address:this._fb.nonNullable.control(this.initialValue?.address??"",[L(),R(m.min,this._localizationService.getSync.bind(this._localizationService)),x(m.max,this._localizationService.getSync.bind(this._localizationService))])})}},e.\u0275fac=function(t){return new(t||e)(i(b),i(E),i(A))},e.\u0275cmp=d({type:e,selectors:[["tis-warehouse-upsert-form"]],inputs:{isEdit:"isEdit",initialValue:"initialValue"},outputs:{formReady:"formReady"},decls:3,vars:2,consts:[[3,"formGroup"],["token","name","formControlName","name","label","\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u0441\u043A\u043B\u0430\u0434\u0430"],["formControlName","address","label","\u0410\u0434\u0440\u0435\u0441 \u0441\u043A\u043B\u0430\u0434\u0430","token","address","placeholder","\u041D\u0430\u043F\u0440\u0438\u043C\u0435\u0440: \u041A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D, \u0410\u043A\u043C\u043E\u043B\u0438\u043D\u0441\u043A\u0430\u044F \u041E\u0431\u043B\u0430\u0441\u0442\u044C, \u0433. \u0410\u0441\u0442\u0430\u043D\u0430, \u0443\u043B. \u0414\u043E\u0441\u0442\u044B\u043A 33, \u043E\u0444\u0438\u0441 125",3,"minHeight"]],template:function(t,u){t&1&&(h(0,"form",0),C(1,"tis-text-field",1)(2,"wk-text-area",2),f()),t&2&&(n("formGroup",u.companyForm),l(2),n("minHeight",68))},dependencies:[g,U,T,N,S,F,y,v,D],styles:[`[_nghost-%COMP%]{display:block}
/*# sourceMappingURL=warehouse-upsert-form.component-TJZEQSMB.css.map */`],changeDetection:0}),e);k=c([_()],k);var Y={type:"success",header:"\u0421\u043A\u043B\u0430\u0434",message:"\u0421\u043A\u043B\u0430\u0434 \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u0441\u043E\u0437\u0434\u0430\u043D"},$={type:"success",header:"\u0421\u043A\u043B\u0430\u0434",message:"\u0421\u043A\u043B\u0430\u0434 \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u043E\u0442\u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D"},ee={type:"error",header:"\u041E\u0448\u0438\u0431\u043A\u0430",message:"\u0417\u0430\u043F\u0440\u043E\u0448\u0435\u043D\u043D\u044B\u0439 \u0441\u043A\u043B\u0430\u0434 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D"};export{k as a,Y as b,$ as c,ee as d};
//# sourceMappingURL=chunk-TR6EGGIZ.js.map
