import{a as S}from"./chunk-HOOIQNHA.js";import{a as Q}from"./chunk-KK44XPBI.js";import{a as M,b as B}from"./chunk-UI5TEX4N.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-TLX24J4H.js";import{a as w,b as I}from"./chunk-RBR4ZJRC.js";import{ya as E}from"./chunk-KOULBGOK.js";import{Ab as b,Ac as v,Tb as p,cc as r,dc as a,gd as y,ic as D,mb as l,oc as d,rb as o,uc as f,vc as c,wa as m,wc as g,xa as s}from"./chunk-ZGECHOBP.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};
