import{Ec as n,Ie as f,Jb as c,Je as g,Ke as E,Le as m,Me as D,Na as l,Vb as u,Yb as v,_b as p,gb as r,hb as T}from"./chunk-NY4TI4KT.js";import{i as d}from"./chunk-IQVXR75E.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]:"Oggi",[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:347eeb695970c32bc275618edc2e751c67145d9fc3012e70543c114a99b9e016*///# sourceMappingURL=chunk-4GSKMGEL.js.map