var __spreadArray=this&&this.__spreadArray||function(e,t){for(var s=0,a=t.length,i=e.length;s<a;s++,i++)e[i]=t[s];return e};System.register(["./index-c820db66.system.js","./index-dc84aac6.system.js","./index-2d937df8.system.js","./index-9ceb7f8c.system.js","./_commonjsHelpers-c8881874.system.js","./index-b0fe4e4c.system.js"],(function(e){"use strict";var t,s,a,i,n,r;return{setters:[function(e){t=e.r;s=e.j;a=e.h;i=e.g},function(e){n=e.c},function(e){r=e.d},function(){},function(){},function(){}],execute:function(){var u={Date:"Datum",Month:"Månad",Weekday:"Dag",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"};function l(e){return r.create({sv:u},e)}var o=".sc-ig-select-offset-h{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}[frequency=daily].sc-ig-select-offset-h{display:none}smoothly-select.sc-ig-select-offset{display:grid;-ms-flex-positive:2;flex-grow:2}smoothly-select.sc-ig-select-offset:nth-of-type(2){border-left:1px solid rgb(var(--smoothly-medium-color))}";var d=e("ig_select_offset",function(){function e(e){t(this,e);this.offsetChanged=s(this,"offsetChanged",7);this.days=[]}e.prototype.componentWillLoad=function(){this.t=l(this.element);this.weekdays=__spreadArray(["Weekday"],n.weekdays);this.quarterly=__spreadArray(["Month"],n.quarterly);this.months=__spreadArray(["Month"],n.months);var e=__spreadArray(["Date"],n.daysOfMonth.map((function(e){return e>=0?(e+1).toString():e.toString()})));this.days=e;this.setValues()};e.prototype.onSelectionChanged=function(e){var t=Number(e.detail.value);e.detail.value=t!=undefined&&t>=0?(t-1).toString():e.detail.value;if(e.detail.identifier=="offset"){this.value=e.detail.value;this.offsetChanged.emit(this.value2?[this.value,this.value2]:this.value)}else if(e.detail.identifier=="offset2"){this.value2=e.detail.value;this.offsetChanged.emit([this.value,this.value2])}};e.prototype.setValues=function(){switch(this.frequency){case"weekly":this.values=this.weekdays;this.value="Weekday";this.value2=undefined;break;case"monthly":this.values=this.days;this.value="Date";this.value2=undefined;break;case"quarterly":this.values=this.quarterly;this.value="Month";this.values2=this.days;this.value2="Date";break;case"yearly":this.values=this.months;this.value="Month";this.values2=this.days;this.value2="Date";break;default:break}};e.prototype.render=function(){var e=this;return[this.values&&this.value?a("smoothly-select",{identifier:"offset",background:"transparent"},this.values.map((function(t){return e.value==t?a("option",{value:t,selected:true},e.t(t)):a("option",{value:t},e.t(t))}))):[],this.values2&&this.value2&&this.value!="Month"?a("smoothly-select",{identifier:"offset2",background:"transparent"},this.values2.map((function(t){return e.value2==t?a("option",{value:t,selected:true},e.t(t)):a("option",{value:t},e.t(t))}))):[]]};Object.defineProperty(e.prototype,"element",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{frequency:["setValues"]}},enumerable:false,configurable:true});return e}());d.style=o}}}));