System.register(["./p-84426aeb.system.js","./p-50f9a219.system.js","./p-9f3d066a.system.js"],(function(e){"use strict";var t,r,i,s,a;return{setters:[function(e){t=e.r;r=e.c;i=e.h},function(){},function(e){s=e.b;a=e.c}],execute:function(){var n=e("smoothly_addresses",function(){function e(e){t(this,e);this.allowed=[];this.editing=undefined;this.change=r(this,"change",7)}Object.defineProperty(e.prototype,"allowedArray",{get:function(){if(!this.allowedArrayValue)this.allowedArrayValue=Array.isArray(this.allowed)?this.allowed:this.allowed.split(" ");return this.allowedArrayValue},enumerable:true,configurable:true});Object.defineProperty(e.prototype,"address",{get:function(){if(typeof this.value=="string")this.value=JSON.parse(this.value);return this.value},enumerable:true,configurable:true});Object.defineProperty(e.prototype,"addresses",{get:function(){return s.is(this.address)?{primary:this.address}:Object.assign({},this.address)},enumerable:true,configurable:true});e.prototype.onChange=function(e){if(s.is(e.detail)){this.editing=undefined;var t=e.detail.type;delete e.detail.type;var r=void 0;if(t=="primary"&&s.is(this.address))r=Object.assign({},e.detail);else{r=Object.assign({},this.addresses);r[t]=e.detail}this.change.emit(this.value=r)}};e.prototype.onTrigger=function(e){if(e.detail.name=="add"&&typeof this.value!="string"){var t=this.addresses;var r=s.create("SE");var i=e.detail.value;t[i]=r;this.value=t;this.editing=i}};e.prototype.render=function(){var e=this;var t=this.allowedArray.filter((function(t){return a.is(e.address)?e.address[t]==undefined:t!="primary"}));return[s.is(this.address)?i("smoothly-address",{editable:this.editable,value:this.address,onChange:function(t){return e.onChange(t)}}):a.map(this.address,(function(t,r){return i("smoothly-address",{mode:t==e.editing?"edit":"display",editable:e.editable,type:t,value:r,onChange:function(t){return e.onChange(t)}})})),t.map((function(e){return i("smoothly-trigger",{color:"primary",fill:"clear",name:"add",value:e},"+",e)}))]};Object.defineProperty(e,"style",{get:function(){return".sc-smoothly-addresses-h{display:block}smoothly-trigger.sc-smoothly-addresses{display:inline-block;margin:5px}"},enumerable:true,configurable:true});return e}())}}}));