System.register(["./index-c820db66.system.js","./index-04238c17.system.js","./index-2d937df8.system.js","./index-8fad73f5.system.js","./App-f9075e71.system.js","./_commonjsHelpers-c8881874.system.js","./index-b0fe4e4c.system.js"],(function(t){"use strict";var e,i,o,s,n,r;return{setters:[function(t){e=t.r;i=t.j;o=t.h;s=t.g},function(){},function(t){n=t.d},function(t){r=t.N},function(){},function(){},function(){}],execute:function(){var l={Save:"Spara",Cancel:"Avbryt",primary:"primär",billing:"fakturering","Please enter a valid email address.":"Ange en giltig e-postadress."};function a(t){return n.create({sv:l},t)}var m=".sc-ig-email-input-h{display:block;margin-top:.5em}smoothly-submit.sc-ig-email-input,smoothly-submit.sc-ig-email-input>button.sc-ig-email-input{background-color:transparent;border:none;cursor:pointer;color:transparent;width:auto;float:right;margin-bottom:.2em}smoothly-input.sc-ig-email-input{border:1px solid rgb(var(--smoothly-medium-color))}form.sc-ig-email-input{display:-ms-flexbox;display:flex;-ms-flex-flow:row;flex-flow:row;-ms-flex-wrap:wrap;flex-wrap:wrap}form.sc-ig-email-input>*.sc-ig-email-input{width:100%}smoothly-select.sc-ig-email-input{display:grid;margin-bottom:.5em}";var c=t("ig_email_input",function(){function t(t){e(this,t);this.edit=i(this,"edit",7);this.add=i(this,"add",7);this.notice=i(this,"notice",7);this.types=[];this.type=this.types[0];this.mode="edit"}t.prototype.componentWillLoad=function(){this.t=a(this.element)};t.prototype.onSubmit=function(t){var e=t.detail.email;if(e){if(this.mode=="add")this.add.emit({type:this.type,value:e});else this.edit.emit(t.detail.email)}else this.notice.emit(r.failed(this.t("Please enter a valid email address.")))};t.prototype.onCancel=function(){this.edit.emit(this.value)};t.prototype.onSelectionChanged=function(t){this.type=t.detail.value};t.prototype.toUpperCase=function(t){return t.charAt(0).toUpperCase()+t.slice(1)};t.prototype.render=function(){var t=this;var e=this.t;return o("form",null,this.mode=="add"?o("smoothly-select",{background:"transparent"},this.types.map((function(i){return t.type==i?o("option",{value:i,selected:true},t.toUpperCase(e(i))):o("option",{value:i},t.toUpperCase(e(i)))}))):[],o("smoothly-input",{type:"email",name:"email",value:this.value},this.mode=="add"?e("Email"):e(this.type)),o("div",null,o("smoothly-submit",{prevent:true,onSubmit:function(e){return t.onSubmit(e)}},o("smoothly-icon",{name:"checkmark-circle",toolTip:e("Save"),color:"success",fill:"clear",size:"small"})),o("smoothly-submit",{prevent:true,onSubmit:function(){return t.onCancel()}},o("smoothly-icon",{name:"close-circle",toolTip:e("Cancel"),color:"light",fill:"clear",size:"small"}))))};Object.defineProperty(t.prototype,"element",{get:function(){return s(this)},enumerable:false,configurable:true});return t}());c.style=m}}}));