import{a as b}from"./chunk-INYS22QV.js";import{c as _,e as P}from"./chunk-WQH23ZT3.js";import{a as O}from"./chunk-C6F5C3R4.js";import{a as M}from"./chunk-X3FRBUJC.js";import{e as w}from"./chunk-GJIGZB63.js";import{Ad as h,Eb as s,Fd as x,Kb as p,Rc as o,Sc as f,Tc as C,Vb as i,cc as l,dc as m,ec as d,nc as g,rb as a,sb as c,ud as u,ya as r}from"./chunk-J476KISY.js";function k(n,v){if(n&1&&(l(0,"div",1),d(1,"paw-tag",2),o(2,"async"),o(3,"pawFormatElapsedDigits"),m()),n&2){let t=g();a(),i("customBgColor",t.backgroundColor)("customFontColor","var(--paw-text-primary)")("icon","far "+(t.icon||"fa-clock"))("label",C(3,7,f(2,5,t.stopwatch.elapsedTime),t.accuracy)+(t.label?" \u2022 "+t.label:""))("styleClass",t.boldText?"bold-text":"")}}var j=(()=>{class n{constructor(t){this.stopwatchService=t,this.boldText=!1,this.stopwatch=t.createStopwatch()}ngOnInit(){this.setDate()}ngOnChanges(t){let e=t.startDate;e&&!e.isFirstChange()&&e.currentValue!==e.previousValue&&(this.startDate=e.currentValue,this.setDate())}ngOnDestroy(){this.stopwatch.destroy()}setDate(){this.startDate&&this.stopwatch.stop().setDate(this.startDate).start()}static{this.\u0275fac=function(e){return new(e||n)(c(b))}}static{this.\u0275cmp=s({type:n,selectors:[["paw-time-tracker"]],inputs:{startDate:"startDate",accuracy:"accuracy",icon:"icon",backgroundColor:"backgroundColor",textColor:"textColor",label:"label",boldText:"boldText"},features:[r],decls:1,vars:1,consts:[["class","time-tracker-container",4,"ngIf"],[1,"time-tracker-container"],[3,"customBgColor","customFontColor","icon","label","styleClass"]],template:function(e,y){e&1&&p(0,k,4,10,"div",0),e&2&&i("ngIf",y.startDate)},dependencies:[x,u,h,P,_,w,O,M],styles:[".time-tracker-container[_ngcontent-%COMP%]{display:inline-block;margin-right:2px;margin-left:2px}.time-tracker-container[_ngcontent-%COMP%]     .bold-text .tag-label{font-weight:700!important}.time-tracker-container[_ngcontent-%COMP%]   .timer-card[_ngcontent-%COMP%]{display:flex;align-items:center;border-radius:var(--paw-rounded-l);overflow:hidden;padding:4px 12px;min-width:120px;height:28px}.time-tracker-container[_ngcontent-%COMP%]   .timer-card[_ngcontent-%COMP%]   .timer-icon[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;margin-right:6px}.time-tracker-container[_ngcontent-%COMP%]   .timer-card[_ngcontent-%COMP%]   .timer-icon[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:var(--paw-font-size-s)}.time-tracker-container[_ngcontent-%COMP%]   .timer-card[_ngcontent-%COMP%]   .timer-value[_ngcontent-%COMP%]{font-weight:600;font-size:var(--paw-font-size-s);white-space:nowrap}.time-tracker-container[_ngcontent-%COMP%]   .timer-card[_ngcontent-%COMP%]   .timer-separator[_ngcontent-%COMP%]{margin:0 6px;width:3px;height:3px;border-radius:50%;background-color:currentColor;opacity:.8}.time-tracker-container[_ngcontent-%COMP%]   .timer-card[_ngcontent-%COMP%]   .timer-label[_ngcontent-%COMP%]{font-size:var(--paw-font-size-s);font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100px}"]})}}return n})();export{j as a};
