import{Gn as Pve,Gr as Va,Ia as f$,Ic as zb,Mo as kve,Q as EV,Qi as bV,_s as ph,en as Kx,ho as j$,jt as Hve,pt as Fve,zr as Uve}from"./chunk-B_pj7Jpm.js";function v(t,a){if(t&1&&j$(0),t&2)zb(` `,f$().text,`
`)}var g=class t{store=ph.required();date=ph.required();groupedDateLabels=ph({1:"امروز",2:"دیروز",3:"This week",4:"This month",5:"Last month",6:"Older"});text;dateDisplayed=!1;ngOnInit(){let a=[{value:1,validator:e=>Pve(e)},{value:2,validator:e=>kve(e)},{value:3,validator:e=>Hve(e)},{value:4,validator:e=>Fve(e)},{value:5,validator:e=>Uve(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=Va({type:t,selectors:[[`my-date-group-label`]],hostVars:2,hostBindings:function(e,i){e&2&&Kx(`date-displayed`,i.dateDisplayed)},inputs:{store:[1,`store`],date:[1,`date`],groupedDateLabels:[1,`groupedDateLabels`]},decls:1,vars:1,template:function(e,i){e&1&&EV(0,v,1,1),e&2&&bV(i.text?0:-1)},encapsulation:2})};export{g as t};
//# debugId=210d8df7-1240-548e-a5b6-5871e50fa70b
//# sourceMappingURL=chunk-ffD22sk92.js.map