import{r as s,c as t,h as i}from"./p-c87337b7.js";const e=class{constructor(i){s(this,i),this.type="primary",this.mode="display",this.change=t(this,"change",7)}onChange(s){s.stopPropagation(),this.value=s.detail,this.mode="display",this.change.emit(Object.assign({type:this.type},this.value))}render(){return"edit"==this.mode?[i("label",null,this.type),i("smoothly-address-edit",{onChange:s=>this.onChange(s),value:this.value})]:[i("label",null,this.type),this.editable?i("smoothly-submit",{color:"primary",fill:"clear",prevent:!0,onSubmit:()=>this.mode="edit"},"Edit"):[],i("smoothly-address-display",{value:this.value})]}static get style(){return".sc-smoothly-address-h{display:block;position:relative}[hidden].sc-smoothly-address-h{display:none}smoothly-submit.sc-smoothly-address{float:right}label.sc-smoothly-address{display:block;-webkit-margin-before:.6em;margin-block-start:.6em;-webkit-margin-after:.2em;margin-block-end:.2em}"}};export{e as smoothly_address};