import{$a as T,Ae as g,Bb as c,Be as E,Ce as m,De as D,Ka as l,Nb as u,Qb as v,Sb as p,_a as r,yc as n,ze as f}from"./chunk-AVPM423Z.js";import{i as d}from"./chunk-W5TMGCPH.js";function L(t,i){if(t&1&&v(0),t&2){let h=c();p(" ",h.text,`
`);}}var a=function(t){return t[t.TODAY=1]="TODAY",t[t.YESTERDAY=2]="YESTERDAY",t[t.THIS_WEEK=3]="THIS_WEEK",t[t.THIS_MONTH=4]="THIS_MONTH",t[t.LAST_MONTH=5]="LAST_MONTH",t[t.OLDER=6]="OLDER",t;}(a||{}),Y=(()=>{let i=class i{store=n.required();date=n.required();groupedDateLabels=n({[a.TODAY]:"U\xE8i",[a.YESTERDAY]:"Yesterday",[a.THIS_WEEK]:"This week",[a.THIS_MONTH]:"This month",[a.LAST_MONTH]:"Last month",[a.OLDER]:"Older"});text;dateDisplayed=!1;ngOnInit(){let o=[{value:a.TODAY,validator:e=>f(e)},{value:a.YESTERDAY,validator:e=>g(e)},{value:a.THIS_WEEK,validator:e=>D(e)},{value:a.THIS_MONTH,validator:e=>E(e)},{value:a.LAST_MONTH,validator:e=>m(e)},{value:a.OLDER,validator:()=>!0}];for(let e of o)if(e.validator(new Date(this.date()))){if(this.store().has(e.value)===!0||e.value===a.OLDER&&this.store().size===0)break;this.store().add(e.value),this.text=this.groupedDateLabels()[e.value],this.dateDisplayed=!0;break;}}};d(i,"\u0275fac",function(e){return new(e||i)();}),d(i,"\u0275cmp",l({type:i,selectors:[["my-date-group-label"]],hostVars:2,hostBindings:function(e,s){e&2&&u("date-displayed",s.dateDisplayed);},inputs:{store:[1,"store"],date:[1,"date"],groupedDateLabels:[1,"groupedDateLabels"]},decls:1,vars:1,template:function(e,s){e&1&&r(0,L,1,1),e&2&&T(s.text?0:-1);},encapsulation:2,changeDetection:0}));let t=i;return t;})();export{a,Y as b};/**i18n:ceac57349051bcddcb40dd2878e0abcb86556d5ceb9d6109d22ac3f1ae3cc7b1*///# sourceMappingURL=chunk-SNPIALXV.js.map