import{a as T,c as k,d as x}from"./chunk-KGCVL6CP.js";import{f as l,s as d}from"./chunk-LBZE4AC4.js";import{b as B}from"./chunk-RTVR37QC.js";import{I as A,La as L}from"./chunk-QHAVDXDG.js";import{d as n,f as F,g as v,j as S,ma as U,n as D,o as b,q as R,s as N}from"./chunk-27KSTDMK.js";import{z as c}from"./chunk-GQAU5ACB.js";import{Bb as i,Ea as f,Ga as C,Ib as E,fd as r,gd as u,hc as o,ic as y,jc as g,kc as p,qa as h,sb as m,yd as _}from"./chunk-ISMRT7VU.js";var K=(()=>{class e{constructor(a,t,s){this._fb=a,this._cdr=t,this._localizationService=s,this.destroyRef=h(f),this.isEdit=!1,this.formReady=new C}ngDoCheck(){this._cdr.markForCheck()}ngOnInit(){this._buildForm(),this.formReady.emit(this.companyForm),this.companyForm.valueChanges.pipe(c(this.destroyRef)).subscribe(()=>this._cdr.markForCheck()),this.companyForm.statusChanges.pipe(c(this.destroyRef)).subscribe(()=>this._cdr.markForCheck())}_buildForm(){this.companyForm=this._fb.group({name:this._fb.nonNullable.control(this.initialValue?.name??"",[n.required,n.minLength(l.min),n.maxLength(l.max)]),address:this._fb.nonNullable.control(this.initialValue?.address??"",[T(),x(d.min,this._localizationService.getSync.bind(this._localizationService)),k(d.max,this._localizationService.getSync.bind(this._localizationService))])})}static{this.\u0275fac=function(t){return new(t||e)(i(R),i(_),i(L))}}static{this.\u0275cmp=E({type:e,selectors:[["tis-warehouse-upsert-form"]],inputs:{isEdit:"isEdit",initialValue:"initialValue"},outputs:{formReady:"formReady"},decls:6,vars:11,consts:[[3,"formGroup"],["token","name","formControlName","name",3,"label"],["formControlName","address","token","address",3,"minHeight","label","placeholder"]],template:function(t,s){t&1&&(y(0,"form",0),p(1,"tis-text-field",1),r(2,"translate"),p(3,"wk-text-area",2),r(4,"translate"),r(5,"translate"),g()),t&2&&(o("formGroup",s.companyForm),m(),o("label",u(2,5,"\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u0441\u043A\u043B\u0430\u0434\u0430")),m(2),o("minHeight",68)("label",u(4,7,"\u0410\u0434\u0440\u0435\u0441 \u0441\u043A\u043B\u0430\u0434\u0430"))("placeholder",u(5,9,"\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")))},dependencies:[U,B,N,S,F,v,b,D,A],styles:[`[_nghost-%COMP%]{display:block}
/*# sourceMappingURL=warehouse-upsert-form.component-TJZEQSMB.css.map */`],changeDetection:0})}}return e})();function Y(e){return{type:"success",header:e("\u0421\u043A\u043B\u0430\u0434"),message:e("\u0421\u043A\u043B\u0430\u0434 \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u0441\u043E\u0437\u0434\u0430\u043D")}}function $(e){return{type:"success",header:e("\u0421\u043A\u043B\u0430\u0434"),message:e("\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")}}function ee(e){return{type:"error",header:e("\u041E\u0448\u0438\u0431\u043A\u0430"),message:e("\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-6DMXK2ZU.js.map
