import{r as t,h as s,g as e,c as a}from"./p-bf76c688.js";import"./p-2094943b.js";import{e as i}from"./p-c87b74f2.js";import{d as l}from"./p-07ea43bc.js";import{d as n}from"./p-a5952676.js";const d={"Upcoming payments":"Kommande betalningar"},r=class{constructor(s){t(this,s)}componentWillLoad(){this.t=l.create({sv:d},this.element)}render(){return[s("table",null,s("tr",{color:"light"},s("td",null,this.t("Upcoming payments"))),this.dates?this.dates.map(t=>s("tr",null,s("td",null,n.DateTime.localize(n.DateTime.parse(t)).slice(0,10)))):[])]}get element(){return e(this)}};r.style=".sc-payfunc-future-due-dates-h{display:block}[hidden].sc-payfunc-future-due-dates-h{display:none}.sc-payfunc-future-due-dates-h>table.sc-payfunc-future-due-dates{border:1px solid rgb(var(--smoothly-medium-color));width:100%;height:100%}tr.sc-payfunc-future-due-dates:first-of-type{border-bottom:1px solid rgb(var(--smoothly-medium-color));font-weight:bold}td.sc-payfunc-future-due-dates{padding:.3em}";const h={"-2":"third to last","-1":"second to last",0:"last"},u={frequency:"frekvens",offset:"offset",daily:"daglig",weekly:"veckovis",monthly:"månadsvis",quarterly:"kvartalsvis",yearly:"årlig",date:"datum",month:"månad",weekday:"veckodag",monday:"måndag",tuesday:"tisdag",wednesday:"onsdag",thursday:"torsdag",friday:"fredag",saturday:"lördag",sunday:"söndag",january:"januari",february:"februari",march:"mars",may:"maj",june:"juni",july:"juli",august:"augusti",october:"oktober",first:"första",second:"andra",third:"tredje","-2":"tredje sista dagen","-1":"andra sista dagen",0:"sista dagen"},o=class{constructor(s){t(this,s),this.notice=a(this,"notice",7),this.advanced=!1}componentWillLoad(){this.t=l.create({sv:u,en:h},this.element),this.frequency="object"==typeof this.schedule?this.schedule.frequency:this.schedule,this.offset=i.is(this.schedule)&&"daily"!=this.schedule.frequency?this.schedule.offset:void 0,this.divisor=i.is(this.schedule)?this.schedule.divisor:void 0}render(){return[s("section",null,s("label",null,this.t("frequency")),s("smoothly-display",{type:"text",value:this.t(this.frequency)})),"quarterly"!=this.frequency&&"yearly"!=this.frequency||null==this.offset?[]:s("section",null,s("label",null,this.t("month")),s("smoothly-display",{type:"text",value:this.t(Array.isArray(this.offset)?i.months[this.offset[0]]:i.months[this.offset])})),"monthly"!=this.frequency&&("yearly"!=this.frequency&&"quarterly"!=this.frequency||!Array.isArray(this.offset))||null==this.offset?[]:s("section",null,s("label",null,this.t("date")),s("smoothly-display",{type:"text",value:this.t(Array.isArray(this.offset)?(this.offset[1]+1).toString():(this.offset+1).toString())})),"weekly"!=this.frequency||Array.isArray(this.offset)||null==this.offset?[]:s("section",null,s("label",null,this.t("weekday")),s("smoothly-display",{type:"text",value:this.t(i.weekdays[this.offset-1])})),null!=this.divisor?s("section",null,s("label",null,this.t("divisor")),s("smoothly-display",{type:"text",value:Array.isArray(this.divisor)?this.divisor[0].toString()+" / "+this.divisor[1].toString():this.divisor.toString()})):[]]}get element(){return e(this)}};o.style=".sc-payfunc-schedule-h{width:100%;display:flex;flex-direction:row;justify-content:space-around}[hidden].sc-payfunc-schedule-h{display:none}.sc-payfunc-schedule-h>section.sc-payfunc-schedule{width:100%}.sc-payfunc-schedule-h>section.sc-payfunc-schedule>label.sc-payfunc-schedule{font-weight:bold;text-align:left;padding-bottom:.2em;text-transform:capitalize}.sc-payfunc-schedule-h>section.sc-payfunc-schedule>smoothly-display.sc-payfunc-schedule{width:10em;max-width:10em;text-transform:capitalize;align-self:flex-start}";export{r as payfunc_future_due_dates,o as payfunc_schedule}