import{a as S}from"./chunk-7OHZ5AUE.js";import{a as Q}from"./chunk-LVPRCERD.js";import{a as M,b as B}from"./chunk-2MX6A4WK.js";import{q as N}from"./chunk-CZO7TLJA.js";import{H as C,J as A,M as V,P as R,Y as F}from"./chunk-OJKN3TNK.js";import{a as w,b as I}from"./chunk-LJIIRAVZ.js";import{q as E}from"./chunk-OIJW4GMG.js";import{$b as r,$c as y,Qb as p,ac as a,fc as D,jb as l,jc as d,ob as o,pc as f,qc as c,rc as g,va as m,vc as v,wa as s,xb as b}from"./chunk-3FIHWXA5.js";import{b as _,i as T}from"./chunk-QOJKCMZT.js";T();var j=["numpad"],k=["numberInput"],x=class h{constructor(u,e,t){this.data=u,this._dialogRef=e,this._cdr=t,this.form=new V(0,{nonNullable:!0,validators:[C.max(N.max),C.required]})}ngOnInit(){this._dialogRef.instance?.submitted.pipe(I(this)).subscribe(()=>this._cdr.markForCheck())}ngAfterViewInit(){this.focus()}focus(){let u=this.numberInput.textField.inputEl.nativeElement;this.numpad.attachTarget(u)}submitted(){this.form.invalid||(this._dialogRef.submitData$$.next(this.form.value),this._dialogRef.submit())}static{this.\u0275fac=function(e){return new(e||h)(o(B),o(M),o(y))}}static{this.\u0275cmp=b({type:h,selectors:[["tis-shift-manage-dialog"]],viewQuery:function(e,t){if(e&1&&(f(j,5),f(k,5)),e&2){let i;c(i=g())&&(t.numpad=i.first),c(i=g())&&(t.numberInput=i.first)}},decls:7,vars:4,consts:[["numberInput",""],["numpad",""],[1,"font-st2-secondary","subtitle"],["postfix","\u20B8","label","\u0421\u0443\u043C\u043C\u0430","token","numpad-shift",3,"focused","formControl","precision","labelBold"],[3,"submitted","buttonVariant"]],template:function(e,t){if(e&1){let i=D();r(0,"div")(1,"span",2),v(2," \u0412\u0430\u043C \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0432\u0432\u0435\u0441\u0442\u0438 \u043E\u0441\u0442\u0430\u0442\u043E\u043A \u043D\u0430\u043B\u0438\u0447\u043D\u044B\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u043D\u0430 \u043A\u0430\u0441\u0441\u0435 \u0438 \u043D\u0430\u0436\u0430\u0442\u044C \u043D\u0430 \u043A\u043D\u043E\u043F\u043A\u0443 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F "),a(),r(3,"tis-number-input",3,0),d("focused",function(){return m(i),s(t.focus())}),a()(),r(5,"tis-numpad",4,1),d("submitted",function(){return m(i),s(t.submitted())}),a()}e&2&&(l(3),p("formControl",t.form)("precision",2)("labelBold",!0),l(2),p("buttonVariant",t.data.buttonVariant))},dependencies:[E,F,A,R,Q,S],styles:[".subtitle[_ngcontent-%COMP%]{display:block;margin-bottom:16px}"],changeDetection:0})}};x=_([w()],x);var q=function(n){return n[n.Open=0]="Open",n[n.Close=1]="Close",n}(q||{});export{x as a,q as b};
