import{Ae as f,Be as g,Ce as E,Db as c,De as m,Ee as D,La as l,Pb as u,Sb as v,Ub as p,ab as r,bb as T,xc as n}from"./chunk-HJJWL6RD.js";import{i as d}from"./chunk-H2BCKOF6.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]:"Aujourd'hui",[a.YESTERDAY]:"Hier",[a.THIS_WEEK]:"Cette semaine",[a.THIS_MONTH]:"Ce mois-ci",[a.LAST_MONTH]:"Le mois dernier",[a.OLDER]:"Plus vieux"});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:671d995daee9c68b73ac729b7ab2c3cf3be32c7f1a24d9dfa94e261c45ee5241*///# sourceMappingURL=chunk-PQFKPY2P.js.map