import{Bc as zve,Cr as Qx,Ds as qve,Fn as MV,Gn as NV,X as D$,_n as Kve,_s as ph,fn as Kb,ji as Yve,mi as Wve,nn as J$,s as $a}from"./chunk-b0nJCs5_.js";function v(t,a){if(t&1&&J$(0),t&2)Kb(` `,D$().text,`
`)}var g=class t{store=ph.required();date=ph.required();groupedDateLabels=ph({1:"Σήμερα",2:"Yesterday",3:"This week",4:"This month",5:"Last month",6:"Older"});text;dateDisplayed=!1;ngOnInit(){let a=[{value:1,validator:e=>zve(e)},{value:2,validator:e=>Wve(e)},{value:3,validator:e=>Kve(e)},{value:4,validator:e=>qve(e)},{value:5,validator:e=>Yve(e)},{value:6,validator:()=>!0}];for(let e of a)if(e.validator(new Date(this.date()))){if(this.store().has(e.value)===!0||e.value===6&&this.store().size===0)break;this.store().add(e.value),this.text=this.groupedDateLabels()[e.value],this.dateDisplayed=!0;break}}static ɵfac=function(e){return new(e||t)};static ɵcmp=$a({type:t,selectors:[[`my-date-group-label`]],hostVars:2,hostBindings:function(e,i){e&2&&Qx(`date-displayed`,i.dateDisplayed)},inputs:{store:[1,`store`],date:[1,`date`],groupedDateLabels:[1,`groupedDateLabels`]},decls:1,vars:1,template:function(e,i){e&1&&NV(0,v,1,1),e&2&&MV(i.text?0:-1)},encapsulation:2})};export{g as t};
//# debugId=2e9d7c8d-de86-5a8c-b0c2-64a8f5165c58
//# sourceMappingURL=chunk-D5Fy1Inu.js.map