import {O as Oi}from'./chunk-JxniNUSx.js';import {J,ex as L,wS as Vh,wT as Eh,qt as Mp,wU as bh,vQ as Np,wQ as _p,c as tS,H as ul,qA as pn,wV as De,vX as hn,wR as un,wW as Ue,wX as we,aa as ye,N as Sr,ad as ce}from'./main-WUGO6e7n.js';var c,R,T=J(()=>{c=L(Oi());Vh();Eh();Mp();bh();Np();_p();tS();ul();R=(()=>{class l{constructor(t){this.translator=t;}format(t){if(!t||t.scheduleMode!==pn.Custom)return "";let e=t.everyX??0,r=this.t("lblEvery").toLowerCase(),u=t.scheduleAtDateTime?` ${this.t("lblAt").toLowerCase()} ${c.default.utc(t.scheduleAtDateTime).local().format("HH:mm")}`:"",h=this.t("lblOn").toLowerCase(),i=this.formatDateRange(t.startDate,t.endDate);switch(t.recurrenceMode){case De.EveryXMinute:return `${r} ${e} ${this.plural(e,"lblMinute","lblMinutes")}${i}`;case De.Hourly:return `${r} ${e} ${this.plural(e,"lblHour","lblHours")}${i}`;case De.EveryXDay:return `${r} ${e} ${this.plural(e,"lblDay","lblDays")}${u}${i}`;case De.EveryXWeekOnSelectedDays:return `${r} ${e} ${this.plural(e,"lblWeek","lblWeeks")} ${h} ${this.formatDays(t.daysOfWeek)}${u}${i}`;case De.EveryXMonthOnDayOfWeek:return `${r} ${e} ${this.plural(e,"lblMonth","lblMonths")} ${h} ${this.positionName(t.position)} ${this.dayName(t.dayOfWeek)}${u}${i}`;default:return ""}}formatHeartbeat(t){if(!t||t.scheduleMode!==hn.Custom)return "";let e=this.t("lblEvery").toLowerCase(),r=this.heartbeatUnitName(t.scheduleFrequencyUnit),u=t.scheduleFrequencyUnit===un.Day&&t.scheduleAtDateTime?` ${this.t("lblAt").toLowerCase()} ${c.default.utc(t.scheduleAtDateTime).local().format("HH:mm")}`:"";return `${e} ${t.scheduleFrequency} ${r}${u}`}heartbeatUnitName(t){switch(t){case un.Day:return this.t("lblDays").toLowerCase();case un.Hour:return this.t("lblHours").toLowerCase();case un.Minute:return this.t("lblMinutes").toLowerCase();default:return ""}}formatDateRange(t,e){let r="";return t&&(r+=` ${this.t("lblStarting").toLowerCase()} ${c.default.utc(t).local().format("YYYY-MM-DD")}`),e&&(r+=` ${this.t("lblUntil").toLowerCase()} ${c.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 Ue.First:return this.t("lblFirst").toLowerCase();case Ue.Second:return this.t("lblSecond").toLowerCase();case Ue.Third:return this.t("lblThird").toLowerCase();case Ue.Fourth:return this.t("lblFourth").toLowerCase();case Ue.Last:return this.t("lblLast").toLowerCase();default:return ""}}dayName(t){switch(t){case we.Monday:return this.t("lblMonday").toLowerCase();case we.Tuesday:return this.t("lblTuesday").toLowerCase();case we.Wednesday:return this.t("lblWednesday").toLowerCase();case we.Thursday:return this.t("lblThursday").toLowerCase();case we.Friday:return this.t("lblFriday").toLowerCase();case we.Saturday:return this.t("lblSaturday").toLowerCase();case we.Sunday:return this.t("lblSunday").toLowerCase().trim();default:return ""}}formatDays(t){return !t||t.length===0?"":t.map(e=>this.dayName(e)).join(", ")}static{this.\u0275fac=function(e){return new(e||l)(ye(Sr))};}static{this.\u0275prov=ce({token:l,factory:l.\u0275fac,providedIn:"root"});}}return l})();});export{R,T};