import{a as S}from"./chunk-PPEFCA53.js";import{a as Q}from"./chunk-LDPZ3XS5.js";import{q as N}from"./chunk-QIDUJNWO.js";import{G as R,Oa as F,Pa as B,p as C,r as M,u as A,x as V}from"./chunk-D2E2EQ56.js";import{a as w,b as I}from"./chunk-XVWHZ5TH.js";import{ya as E}from"./chunk-ZZKAL5UM.js";import{Bb as b,Bc as v,Ub as p,dc as r,ec as a,gd as y,jc as D,nb as l,pc as d,sb as o,vc as f,wc as c,xa as m,xc as g,ya as s}from"./chunk-LEOKSAW2.js";import{d as _,n as T}from"./chunk-HE7HQ6LI.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 A(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(F),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,R,M,V,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};
