import{b as d,c as y}from"./chunk-K5GYIXDP.js";import{e as m,l as f}from"./chunk-V7SDUNGM.js";import{A as a,Qa as h,Za as p,y as u}from"./chunk-4BILO7NM.js";var U=(()=>{let i=class i{constructor(n,s,t){this.http=n,this.authRefService=s,this.datePipe=t,this.activeUser=null,this.watchUser()}watchUser(){this.userSubscription=this.authRefService.user.subscribe({next:n=>{this.activeUser=n}})}generateDailySummary(n,s){if(this.activeUser!=null){let t=[];s.forEach(e=>{e.priority==y.Critical&&e.status!=d.Completed&&t.push(e)});let r=[];n.forEach(e=>{e.status!=m.Canceled&&r.push(e)});let c=r.length==1?"appointment":"appointments",g=t.length==1?"reminder":"reminders";if(t.length>0&&r.length>0){let e=r[0].scheduled_Utc,l=this.datePipe.transform(e,"h:mm a");return`
                    Today, you have ${t.length} critical reminders to follow up on,
                    followed by ${r.length} ${c} with the first starting at ${l}.
                `}else if(r.length>0){let e=r[0].scheduled_Utc,l=this.datePipe.transform(e,"h:mm a");return`
                    Today, you have ${r.length} ${c} with the first starting at ${l}.
                `}else return t.length>0?`
                    Today, you have ${t.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(n,s,t){return s.length>0&&t!=null?`
                You currently have ${n.length} viewable consultants, and and are currently viewing ${t.fullName}'s appointments.
            `:`
                You currently have ${n.length} viewable consultants and are currently not viewing any appointments.
            `}ngOnDestroy(){this.userSubscription?.unsubscribe()}};i.\u0275fac=function(s){return new(s||i)(a(p),a(f),a(h))},i.\u0275prov=u({token:i,factory:i.\u0275fac});let o=i;return o})();export{U as a};
