import{a as L}from"./chunk-YEPWRSVJ.js";import{a as Q,e as O}from"./chunk-VFX53AYF.js";import{r as j}from"./chunk-ZVQ5RRLK.js";import{b as k}from"./chunk-XJK5B3XJ.js";import{D as A,Ga as B,Ha as E,Oa as F,Ra as N,q as V,s as T,v as x}from"./chunk-NKXT7PF4.js";import{a as M,b as R}from"./chunk-IGFM5CCE.js";import{ua as I}from"./chunk-TDUJNOEU.js";import{Ac as g,Bc as h,Db as v,dc as m,ec as p,fc as d,fd as b,gc as y,gd as C,lb as a,nc as D,tc as f,ua as u,va as l,wb as s,zc as c,zd as w}from"./chunk-I3FGJX2C.js";import{d as _,n as U}from"./chunk-INB5GR2I.js";U();var G=["numpad"],P=["numberInput"],i,S=(i=class{constructor(o,t,e){this.data=o,this._dialogRef=t,this._cdr=e,this.form=new T(0,{nonNullable:!0,validators:[O(j.max),Q()]})}ngOnInit(){this._dialogRef.instance?.submitted.pipe(R(this)).subscribe(()=>this._cdr.markForCheck())}ngAfterViewInit(){this.focus()}focus(){let o=this.numberInput.numberInput.textField.inputEl.nativeElement;this.numpad.attachTarget(o)}submitted(){this.form.invalid||(this._dialogRef.submitData$$.next(this.form.value),this._dialogRef.submit())}},i.\u0275fac=function(t){return new(t||i)(s(E),s(B),s(w))},i.\u0275cmp=v({type:i,selectors:[["tis-shift-manage-dialog"]],viewQuery:function(t,e){if(t&1&&(c(G,5),c(P,5)),t&2){let n;g(n=h())&&(e.numpad=n.first),g(n=h())&&(e.numberInput=n.first)}},decls:8,vars:10,consts:[["numberInput",""],["numpad",""],[1,"shift-manage-dialog"],["type","info",3,"secondaryText"],["postfix","\u20B8","token","numpad-shift",3,"focused","formControl","precision","labelBold","label"],[3,"submitted","buttonVariant"]],template:function(t,e){if(t&1){let n=D();p(0,"div",2),y(1,"wk-message-bar",3),b(2,"translate"),p(3,"wk-number-input",4,0),b(5,"translate"),f("focused",function(){return u(n),l(e.focus())}),d()(),p(6,"tis-numpad",5,1),f("submitted",function(){return u(n),l(e.submitted())}),d()}t&2&&(a(),m("secondaryText",C(2,6,e.data.subtitle)),a(2),m("formControl",e.form)("precision",2)("labelBold",!0)("label",C(5,8,"\u0421\u0443\u043C\u043C\u0430")),a(3),m("buttonVariant",e.data.buttonVariant))},dependencies:[I,A,V,x,F,L,N,k],styles:[`.shift-manage-dialog[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px}
/*# sourceMappingURL=shift-manage-dialog.component-UFDLNEI5.css.map */`],changeDetection:0}),i);S=_([M()],S);var $=(function(r){return r[r.Open=0]="Open",r[r.Close=1]="Close",r})($||{});export{S as a,$ as b};
//# sourceMappingURL=chunk-LVAKUMPV.js.map
