import{a as v}from"./chunk-BZQTS4NW.js";import{ea as a,fa as L,ga as o,ha as C,ia as l,ja as D,ka as $,la as M}from"./chunk-BPZQKZKD.js";import{b as y,c as p}from"./chunk-YBNTOQCK.js";import{be as f,ta as d,xa as m}from"./chunk-WL5U2YIT.js";import{e as b,h as w}from"./chunk-ADEKKGI2.js";var n,g,T=b(()=>{n=w(v());C();D();M();L();f();p();g=(()=>{let s=class s{constructor(t){this.translator=t}format(t){if(!t||t.scheduleMode!==$.Custom)return"";let e=t.everyX??0,r=this.t("lblEvery").toLowerCase(),c=t.scheduleAtDateTime?` ${this.t("lblAt").toLowerCase()} ${n.default.utc(t.scheduleAtDateTime).local().format("HH:mm")}`:"",h=this.t("lblOn").toLowerCase(),i=this.formatDateRange(t.startDate,t.endDate);switch(t.recurrenceMode){case o.EveryXMinute:return`${r} ${e} ${this.plural(e,"lblMinute","lblMinutes")}${i}`;case o.Hourly:return`${r} ${e} ${this.plural(e,"lblHour","lblHours")}${i}`;case o.EveryXDay:return`${r} ${e} ${this.plural(e,"lblDay","lblDays")}${c}${i}`;case o.EveryXWeekOnSelectedDays:return`${r} ${e} ${this.plural(e,"lblWeek","lblWeeks")} ${h} ${this.formatDays(t.daysOfWeek)}${c}${i}`;case o.EveryXMonthOnDayOfWeek:return`${r} ${e} ${this.plural(e,"lblMonth","lblMonths")} ${h} ${this.positionName(t.position)} ${this.dayName(t.dayOfWeek)}${c}${i}`;default:return""}}formatDateRange(t,e){let r="";return t&&(r+=` ${this.t("lblStarting").toLowerCase()} ${n.default.utc(t).local().format("YYYY-MM-DD")}`),e&&(r+=` ${this.t("lblUntil").toLowerCase()} ${n.default.utc(e).local().format("YYYY-MM-DD")}`),r}t(t){return this.translator.translate(t)}plural(t,e,r){return this.t(t>1?r:e).toLowerCase()}positionName(t){switch(t){case l.First:return this.t("lblFirst").toLowerCase();case l.Second:return this.t("lblSecond").toLowerCase();case l.Third:return this.t("lblThird").toLowerCase();case l.Fourth:return this.t("lblFourth").toLowerCase();case l.Last:return this.t("lblLast").toLowerCase();default:return""}}dayName(t){switch(t){case a.Monday:return this.t("lblMonday").toLowerCase();case a.Tuesday:return this.t("lblTuesday").toLowerCase();case a.Wednesday:return this.t("lblWednesday").toLowerCase();case a.Thursday:return this.t("lblThursday").toLowerCase();case a.Friday:return this.t("lblFriday").toLowerCase();case a.Saturday:return this.t("lblSaturday").toLowerCase();case a.Sunday:return this.t("lblSunday").toLowerCase().trim();default:return""}}formatDays(t){return!t||t.length===0?"":t.map(e=>this.dayName(e)).join(", ")}};s.\u0275fac=function(e){return new(e||s)(m(y))},s.\u0275prov=d({token:s,factory:s.\u0275fac,providedIn:"root"});let u=s;return u})()});export{g as a,T as b};
