System.register(["./index-c820db66.system.js","./index-2d937df8.system.js","./_commonjsHelpers-c8881874.system.js"],(function(e){"use strict";var t,i,s,n,o;return{setters:[function(e){t=e.r;i=e.j;s=e.h;n=e.g},function(e){o=e.d},function(){}],execute:function(){var r={Edit:"Redigera",Delete:"Radera",primary:"primär",billing:"fakturering",delivery:"leverans",visit:"besök"};function l(e){return o.create({sv:r},e)}var a=".sc-ig-address-h{display:block;position:relative}[hidden].sc-ig-address-h{display:none}smoothly-icon.sc-ig-address{cursor:pointer;margin-top:.3em}label.sc-ig-address{display:inline-block;-webkit-margin-before:.6em;margin-block-start:.6em;-webkit-margin-after:.2em;margin-block-end:.2em;text-transform:capitalize;margin-bottom:.2em}smoothly-popup.sc-ig-address{display:none;position:absolute;right:0}.sc-ig-address-h:hover smoothly-popup.sc-ig-address{display:inline}";var d=e("ig_address",function(){function e(e){t(this,e);this.edit=i(this,"edit",7);this.delete=i(this,"delete",7);this.type="primary";this.mode="display"}e.prototype.componentWillLoad=function(){this.t=l(this.element)};e.prototype.onChange=function(e){e.stopPropagation();this.value=e.detail;this.mode="display";this.edit.emit(Object.assign({type:this.type},this.value))};e.prototype.onDelete=function(){this.delete.emit(this.type)};e.prototype.render=function(){var e=this;var t=this.t;return[s("smoothly-popup",null,s("smoothly-icon",{name:"ellipsis-vertical-outline",size:"small"}),s("div",{color:"light",slot:"popup"},s("smoothly-icon",{size:"small",name:"pencil-outline",toolTip:t("Edit"),onClick:function(){return e.mode="edit"}}),s("smoothly-icon",{size:"small",name:"trash",toolTip:"Delete",onClick:function(){return e.onDelete()}}))),this.mode=="edit"?[s("label",null,t(this.type)),s("ig-address-input",{onEdit:function(t){return e.onChange(t)},value:this.value})]:[s("label",null,t(this.type)),s("ig-address-display",{value:this.value})]]};Object.defineProperty(e.prototype,"element",{get:function(){return n(this)},enumerable:false,configurable:true});return e}());d.style=a}}}));