import{c as X,d as Y}from"./chunk-YBGMN6OR.js";import{a as K}from"./chunk-WQGDHA2L.js";import{g as J}from"./chunk-YFLLMV2L.js";import{d as G}from"./chunk-7EAWKBIV.js";import{$b as o,I as g,Tc as L,Uc as $,Xc as H,cc as R,hc as A,mc as B,nd as q,pd as z,xc as W}from"./chunk-ATD4AEXQ.js";import{$a as w,Bb as x,Ec as k,Ka as a,Kc as V,Qb as h,Qc as P,Rb as T,Ta as U,Ua as f,Ub as D,Vb as E,Wb as j,ca as s,da as c,fa as m,hb as I,ib as y,ja as d,ka as p,nb as u,ob as n,pb as l,qb as N,xa as O,xb as b,zb as Q}from"./chunk-BXH3QC5E.js";function ee(e,Z){if(e&1&&N(0,"mat-icon",7),e&2){let t=x(2);u("svgIcon",t.titleIcon)}}function te(e,Z){if(e&1&&(n(0,"div",2),I(1,ee,1,1,"mat-icon",7),n(2,"h4",8),h(3),l()()),e&2){let t=x();u("ngClass",t.getTitleClass()),a(),y(t.isTitleIconFilled()?1:-1),a(2),T(t.title)}}var ie=(()=>{class e{title=null;titleIcon=null;minValue=1;maxValue;initialValue;valueChange=new w;currentValue;ngOnChanges(){if(o.isNullOrUndefined(this.maxValue)){this.currentValue=null;return}if(o.isNullOrUndefined(this.initialValue)&&(this.initialValue=this.maxValue),this.initialValue<this.minValue||this.initialValue>this.maxValue){this.currentValue=null;return}this.currentValue=this.initialValue}canDecrement(){return this.isDataValid()&&this.currentValue>this.minValue}decrement(){this.canDecrement()&&(this.currentValue--,this.valueChange.emit(this.currentValue))}canIncrement(){return this.isDataValid()&&this.currentValue<this.maxValue}increment(){this.canIncrement()&&(this.currentValue++,this.valueChange.emit(this.currentValue))}isDataValid(){return!o.isNullOrUndefined(this.maxValue)&&!o.isNullOrUndefined(this.initialValue)&&!o.isNullOrUndefined(this.currentValue)&&this.initialValue>=this.minValue&&this.initialValue<=this.maxValue}forceRefresh(){this.ngOnChanges()}isTitleFilled(){return!o.isNullOrUndefined(this.title)}isTitleIconFilled(){return this.isTitleFilled()&&!o.isNullOrUndefinedOrEmpty(this.titleIcon)}getTitleClass(){let t=["navigator-header"];return this.isTitleIconFilled()||t.push("navigator-header--no-icon"),t}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=U({type:e,selectors:[["abs-spinner"]],inputs:{title:"title",titleIcon:"titleIcon",minValue:"minValue",maxValue:"maxValue",initialValue:"initialValue"},outputs:{valueChange:"valueChange"},standalone:!1,features:[O],decls:12,vars:5,consts:[["inputField",""],[1,"navigator-header-placeholder"],[3,"ngClass"],[1,"navigator-wrapper"],["mat-raised-button","","color","primary",1,"navigator-btn",3,"click","disabled"],[1,"navigator-input"],["matInput","","type","text","readonly","true",1,"input-field",3,"ngModelChange","ngModel","disabled"],[1,"navigator-header-icon",3,"svgIcon"],[1,"navigator-title","abs-primary-color"]],template:function(i,r){if(i&1){let S=b();n(0,"div",1),I(1,te,4,3,"div",2),l(),n(2,"div",3)(3,"button",4),Q("click",function(){return d(S),p(r.decrement())}),n(4,"mat-icon"),h(5,"remove"),l()(),n(6,"mat-form-field",5)(7,"input",6,0),j("ngModelChange",function(M){return d(S),E(r.currentValue,M)||(r.currentValue=M),p(M)}),l()(),n(9,"button",4),Q("click",function(){return d(S),p(r.increment())}),n(10,"mat-icon"),h(11,"add"),l()()()}i&2&&(a(),y(r.isTitleFilled()?1:-1),a(2),u("disabled",!r.canDecrement()),a(4),D("ngModel",r.currentValue),u("disabled",!0),a(2),u("disabled",!r.canIncrement()))},dependencies:[k,R,A,B,q,J,L,X],encapsulation:2})}return e})();var ne=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=f({type:e});static \u0275inj=c({imports:[V,W,z,K,$,Y,H]})}return e})();var C=(()=>{class e{restService;constructor(t){this.restService=t}cleanUpOldProductionQueues(){let t=new P;return t=t.append("async",!0),this.restService.post(`${g.PRODUCTION_QUEUES}/cleanUpOldProductionQueues`,null,t)}getProductionQueues(t){let i=new P;return i=i.append("async",!0),i=i.append("isInitialLoad",t),this.restService.get(`${g.PRODUCTION_QUEUES}`,i)}updateProductionQueue(t,i){return this.restService.patch(`${g.PRODUCTION_QUEUES}/${t}`,i)}static \u0275fac=function(i){return new(i||e)(m(G))};static \u0275prov=s({token:e,factory:e.\u0275fac})}return e})();var _=(()=>{class e{productionQueueService;constructor(t){this.productionQueueService=t}cleanUpOldProductionQueues(){return this.productionQueueService.cleanUpOldProductionQueues()}getProductionQueues(t){return this.productionQueueService.getProductionQueues(t)}updateProductionQueue(t,i){return this.productionQueueService.updateProductionQueue(t,i)}static \u0275fac=function(i){return new(i||e)(m(C))};static \u0275prov=s({token:e,factory:e.\u0275fac})}return e})();var oe=(()=>{class e{static \u0275fac=function(i){return new(i||e)};static \u0275mod=f({type:e});static \u0275inj=c({providers:[_,C],imports:[V]})}return e})();export{ie as a,ne as b,_ as c,oe as d};
