import{a as j}from"./chunk-TB4ZEWK7.js";import{a as O}from"./chunk-NNWHFHRC.js";import{q as T}from"./chunk-QIDUJNWO.js";import{a as S}from"./chunk-MX2TZFKO.js";import{G as x,Na as N,Oa as Q,p as b,r as R,u as F,x as B}from"./chunk-AWFGQCOU.js";import{a as A,b as V}from"./chunk-CKUQY5IU.js";import{ya as M}from"./chunk-UNUNR43V.js";import{Ab as v,Ac as E,Cc as I,Tb as p,Wc as C,Xc as h,cc as a,dc as s,gd as w,ic as y,mb as o,oc as d,rb as r,uc as f,vc as c,wa as m,wc as g,xa as l}from"./chunk-AO7NUUXN.js";import{d as D,n as G}from"./chunk-HE7HQ6LI.js";G();var L=["numpad"],P=["numberInput"],k=class _{constructor(n,e,t){this.data=n,this._dialogRef=e,this._cdr=t,this.form=new F(0,{nonNullable:!0,validators:[b.max(T.max),b.required]})}ngOnInit(){this._dialogRef.instance?.submitted.pipe(V(this)).subscribe(()=>this._cdr.markForCheck())}ngAfterViewInit(){this.focus()}focus(){let n=this.numberInput.textField.inputEl.nativeElement;this.numpad.attachTarget(n)}submitted(){this.form.invalid||(this._dialogRef.submitData$$.next(this.form.value),this._dialogRef.submit())}static{this.\u0275fac=function(e){return new(e||_)(r(Q),r(N),r(w))}}static{this.\u0275cmp=v({type:_,selectors:[["tis-shift-manage-dialog"]],viewQuery:function(e,t){if(e&1&&(f(L,5),f(P,5)),e&2){let i;c(i=g())&&(t.numpad=i.first),c(i=g())&&(t.numberInput=i.first)}},decls:9,vars:10,consts:[["numberInput",""],["numpad",""],[1,"font-st2-secondary","subtitle"],["postfix","\u20B8","token","numpad-shift",3,"focused","formControl","precision","labelBold","label"],[3,"submitted","buttonVariant"]],template:function(e,t){if(e&1){let i=y();a(0,"div")(1,"span",2),E(2),C(3,"translate"),s(),a(4,"tis-number-input",3,0),C(6,"translate"),d("focused",function(){return m(i),l(t.focus())}),s()(),a(7,"tis-numpad",4,1),d("submitted",function(){return m(i),l(t.submitted())}),s()}e&2&&(o(2),I(" ",h(3,6,"\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")," "),o(2),p("formControl",t.form)("precision",2)("labelBold",!0)("label",h(6,8,"\u0421\u0443\u043C\u043C\u0430")),o(3),p("buttonVariant",t.data.buttonVariant))},dependencies:[M,x,R,B,O,j,S],styles:[".subtitle[_ngcontent-%COMP%]{display:block;margin-bottom:16px}"],changeDetection:0})}};k=D([A()],k);var $=function(u){return u[u.Open=0]="Open",u[u.Close=1]="Close",u}($||{});export{k as a,$ as b};
