import{c as d,d as y}from"./chunk-UMOI6TSQ.js";import{e as p,r as f}from"./chunk-KMULZHTM.js";import{Ib as m,J as u,M as s,xb as l}from"./chunk-4SVIVQBS.js";var U=(()=>{let n=class n{constructor(r,o,e){this.http=r,this.authRefService=o,this.datePipe=e,this.activeUser=null,this.watchUser()}watchUser(){this.userSubscription=this.authRefService.user.subscribe({next:r=>{this.activeUser=r}})}generateDailySummary(r,o){if(this.activeUser!=null){let e=[];o.forEach(t=>{t.priority==y.Critical&&t.status!=d.Completed&&e.push(t)});let i=[];r.forEach(t=>{t.status!=p.Canceled&&i.push(t)});let h=i.length==1?"appointment":"appointments",g=e.length==1?"reminder":"reminders";if(e.length>0&&i.length>0){let t=i[0].scheduled_Utc,c=this.datePipe.transform(t,"h:mm a");return`
                    Today, you have ${e.length} critical reminders to follow up on,
                    followed by ${i.length} ${h} with the first starting at ${c}.
                `}else if(i.length>0){let t=i[0].scheduled_Utc,c=this.datePipe.transform(t,"h:mm a");return`
                    Today, you have ${i.length} ${h} with the first starting at ${c}.
                `}else return e.length>0?`
                    Today, you have ${e.length} ${g} to follow up on.
                    There are currently no appointments scheduled for today.
                `:`
                    You currently have no critical reminders or appointments scheduled for today.
                `}return"No summary available."}generateManagerSummary(r,o,e){return`
            You currently have ${r.length} viewable consultants on your team.
        `}ngOnDestroy(){this.userSubscription?.unsubscribe()}};n.\u0275fac=function(o){return new(o||n)(s(m),s(f),s(l))},n.\u0275prov=u({token:n,factory:n.\u0275fac});let a=n;return a})();export{U as a};
