import{a as S}from"./chunk-HBSPKYMF.js";import{f as n,t as m}from"./chunk-ZVQ5RRLK.js";import{b as A}from"./chunk-R7MAHTDS.js";import{A as b,D as N,F as U,o as t,q as g,r as y,v as _,x as D}from"./chunk-YFBLRBP4.js";import{a as F,b as s}from"./chunk-VXSBHXCN.js";import{ua as E}from"./chunk-3OWC7J4L.js";import{Bb as c,Cd as C,Jb as l,fc as i,gc as d,hc as h,ic as f,nb as p,tb as r}from"./chunk-C2QKZJOP.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 l}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=c({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-HP6ZWKMP.js.map
