import{a as k}from"./chunk-GGLTVL5O.js";import{a as O,b as _}from"./chunk-BKJRDU6E.js";import{c as x,e as P}from"./chunk-WAU77KDG.js";import{e as M}from"./chunk-TNAYM34C.js";import{$b as m,Ad as w,Bb as s,Hb as p,Nc as r,Oc as f,Pc as C,Sb as i,ac as l,bc as g,kc as d,ob as a,pb as c,pd as u,va as o,vd as h}from"./chunk-NYZDFFAU.js";function y(n,D){if(n&1&&(m(0,"div",1),g(1,"paw-tag",2),r(2,"async"),r(3,"pawFormatElapsedDigits"),l()),n&2){let t=d();a(),i("customBgColor",t.backgroundColor)("icon","far "+(t.icon||"fa-clock"))("label",C(3,5,f(2,3,t.stopwatch.elapsedTime),t.accuracy)+(t.label?" \u2022 "+t.label:""))}}var j=(()=>{class n{constructor(t){this.stopwatchService=t,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(k))}}static{this.\u0275cmp=s({type:n,selectors:[["paw-time-tracker"]],inputs:{startDate:"startDate",accuracy:"accuracy",icon:"icon",backgroundColor:"backgroundColor",textColor:"textColor",label:"label"},features:[o],decls:1,vars:1,consts:[["class","time-tracker-container",4,"ngIf"],[1,"time-tracker-container"],[3,"customBgColor","icon","label"]],template:function(e,v){e&1&&p(0,y,4,8,"div",0),e&2&&i("ngIf",v.startDate)},dependencies:[w,u,h,P,x,M,_,O],styles:[".time-tracker-container[_ngcontent-%COMP%]{display:inline-block;margin-right:2px;margin-left:2px}.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};
