import{a as S}from"./chunk-JIV6WO6K.js";import{f as n,s}from"./chunk-QIDUJNWO.js";import{f as A}from"./chunk-MX2TZFKO.js";import{B as U,E as b,G as N,p as e,r as g,s as _,w as y,y as D}from"./chunk-AWFGQCOU.js";import{a as F,b as i}from"./chunk-CKUQY5IU.js";import{ya as E}from"./chunk-UNUNR43V.js";import{Ab as l,Ea as p,Tb as r,cc as d,dc as h,ec as f,gd as C,mb as c,rb as u}from"./chunk-AO7NUUXN.js";import{d as a,n as L}from"./chunk-HE7HQ6LI.js";L();var x=class m{constructor(o,t){this._fb=o,this._cdr=t,this.isEdit=!1,this.formReady=new p}ngDoCheck(){this._cdr.markForCheck()}ngOnInit(){this._buildForm(),this.formReady.emit(this.companyForm),this.companyForm.valueChanges.pipe(i(this)).subscribe(()=>this._cdr.markForCheck()),this.companyForm.statusChanges.pipe(i(this)).subscribe(()=>this._cdr.markForCheck())}_buildForm(){this.companyForm=this._fb.group({name:this._fb.nonNullable.control(this.initialValue?.name??"",[e.required,e.minLength(n.min),e.maxLength(n.max)]),address:this._fb.nonNullable.control(this.initialValue?.address??"",[e.required,e.minLength(s.min),e.maxLength(s.max)])})}static{this.\u0275fac=function(t){return new(t||m)(u(b),u(C))}}static{this.\u0275cmp=l({type:m,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,v){t&1&&(d(0,"form",0),f(1,"tis-text-field",1)(2,"tis-text-area",2),h()),t&2&&(r("formGroup",v.companyForm),c(2),r("minHeight",68))},dependencies:[E,S,A,N,y,g,_,D,U],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}};x=a([F()],x);var z={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"},J={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"},K={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,z as b,J as c,K as d};
