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,n,i,s,o,r;return{setters:[function(e){t=e.r;n=e.j;i=e.h;s=e.g},function(e){o=e.g},function(e){r=e.d},function(){},function(){},function(){}],execute:function(){var u={Add:"Lägg till"};function a(e){return r.create({sv:u},e)}var l=".sc-ig-phone-numbers-h{display:block}smoothly-icon.sc-ig-phone-numbers{cursor:pointer;float:right;margin-top:-1.5em;padding-bottom:.5em;visibility:hidden}ig-phone-number.sc-ig-phone-numbers{clear:both}.sc-ig-phone-numbers-h:hover smoothly-icon.sc-ig-phone-numbers{visibility:visible}";var d=e("ig_phone_numbers",function(){function e(e){t(this,e);this.changed=n(this,"changed",7);this.editable=true;this.adding=false}e.prototype.componentWillLoad=function(){this.t=a(this.element)};Object.defineProperty(e.prototype,"types",{get:function(){var e=this;return o.types.filter((function(t){return o.is(e.value)?!e.value[t]:e.value?t!="primary":t}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"phoneNumbers",{get:function(){return o.is(this.value)?Object.assign({},this.value):{primary:this.value}},enumerable:false,configurable:true});e.prototype.onEdit=function(e){var t=e.detail.type;delete e.detail.type;var n;if(!o.is(this.value))n=e.detail.value;else{n=Object.assign({},this.value);n[t]=e.detail.value}this.changed.emit(this.value=n)};e.prototype.onDelete=function(e){var t=e.detail;var n=Object.assign({},this.phoneNumbers);delete n[t];this.changed.emit(this.value=n)};e.prototype.onAdd=function(e){var t=e.detail.type;var n=e.detail.value;var i=this.phoneNumbers;i[t]=n;this.changed.emit(this.value=i);this.adding=false};e.prototype.render=function(){var e=this;return[this.adding?i("ig-phone-number-input",{onEdit:function(t){return e.adding=false},types:this.types,mode:"add",onAdd:function(t){return e.onAdd(t)}}):[],this.editable&&this.types.length>0?i("smoothly-icon",{name:"add-circle",toolTip:this.t("Add"),fill:"clear",size:"medium",color:"success",style:this.adding?{display:"none"}:{},onClick:function(){return e.adding=true}}):[],this.phoneNumbers?o.is(this.value)?o.map(this.value,(function(t,n){return[i("ig-phone-number",{value:n,type:t,editable:e.editable,onEdit:function(t){return e.onEdit(t)},onDelete:function(t){return e.onDelete(t)}})]})):i("ig-phone-number",{value:this.value,editable:this.editable,onEdit:function(t){return e.onEdit(t)},onDelete:function(t){return e.onDelete(t)}}):[]]};Object.defineProperty(e.prototype,"element",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());d.style=l}}}));