import{a as S}from"./chunk-JWB3UQDY.js";import{f as n,t as m}from"./chunk-ZVQ5RRLK.js";import{b as A}from"./chunk-GVW75DLG.js";import{B as N,D as U,o as t,q as g,r as y,u as _,w as D,z as b}from"./chunk-HE5QLLAI.js";import{a as F,b as s}from"./chunk-2RGQU2W2.js";import{ua as E}from"./chunk-KCGGIUK4.js";import{Cb as l,cc as i,dc as d,ec as h,fc as f,kb as p,pb as c,vb as r,yd as C}from"./chunk-4HRPSKID.js";import{d as a,n as T}from"./chunk-INB5GR2I.js";T();var e,x=(e=class{constructor(u,o){this._fb=u,this._cdr=o,this.isEdit=!1,this.formReady=new c}ngDoCheck(){this._cdr.markForCheck()}ngOnInit(){this._buildForm(),this.formReady.emit(this.companyForm),this.companyForm.valueChanges.pipe(s(this)).subscribe(()=>this._cdr.markForCheck()),this.companyForm.statusChanges.pipe(s(this)).subscribe(()=>this._cdr.markForCheck())}_buildForm(){this.companyForm=this._fb.group({name:this._fb.nonNullable.control(this.initialValue?.name??"",[t.required,t.minLength(n.min),t.maxLength(n.max)]),address:this._fb.nonNullable.control(this.initialValue?.address??"",[t.required,t.minLength(m.min),t.maxLength(m.max)])})}},e.\u0275fac=function(o){return new(o||e)(r(N),r(C))},e.\u0275cmp=l({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(o,L){o&1&&(d(0,"form",0),f(1,"tis-text-field",1)(2,"tis-text-area",2),h()),o&2&&(i("formGroup",L.companyForm),p(2),i("minHeight",68))},dependencies:[E,S,A,U,_,g,y,D,b],styles:[`[_nghost-%COMP%]{display:block}
/*# sourceMappingURL=warehouse-upsert-form.component-TJZEQSMB.css.map */`],changeDetection:0}),e);x=a([F()],x);var J={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"},Q={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"},Z={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{x as a,J as b,Q as c,Z as d};
//# sourceMappingURL=chunk-VRNO5TYT.js.map
