import{b as d,c as y}from"./chunk-EQQ2VPVQ.js";import{J as p,V as f}from"./chunk-HCI4ZVW6.js";import{Ib as m,J as u,M as o,xb as l}from"./chunk-FLIJEKW7.js";var U=(()=>{let n=class n{constructor(e,s,r){this.http=e,this.authRefService=s,this.datePipe=r,this.activeUser=null,this.watchUser()}watchUser(){this.userSubscription=this.authRefService.user.subscribe({next:e=>{this.activeUser=e}})}generateDailySummary(e,s){if(this.activeUser!=null){let r=[];s.forEach(t=>{t.priority==y.Critical&&t.status!=d.Completed&&r.push(t)});let i=[];e.forEach(t=>{t.status!=p.Canceled&&i.push(t)});let h=i.length==1?"appointment":"appointments",g=r.length==1?"reminder":"reminders";if(r.length>0&&i.length>0){let t=i[0].scheduled_Utc,c=this.datePipe.transform(t,"h:mm a");return`
                    Today, you have ${r.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 r.length>0?`
                    Today, you have ${r.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(e){return`
            You currently have ${e.length} viewable consultants on your team.
        `}ngOnDestroy(){this.userSubscription?.unsubscribe()}};n.\u0275fac=function(s){return new(s||n)(o(m),o(f),o(l))},n.\u0275prov=u({token:n,factory:n.\u0275fac});let a=n;return a})();export{U as a};
