const t=window.webcomponents.h;import"./chunk-de721f0a.js";import{e}from"./chunk-f9f1602a.js";class a{constructor(){this.id=e.getUUID()}componentDidLoad(){this.postRender()}componentDidUpdate(){this.postRender()}postRender(){this.changeHandler()}changeHandler(){this.change.emit({data:this.getData(),el:this.el,timestamp:e.getTimeStamp()})}async setData(t,e=!1){this.data||(this.data={}),e?Object.keys(t).forEach(e=>{this.data[e]=t[e]}):this.data=t}async getData(){return this.data}async getId(){return this.id}render(){return this.dataJson&&(this.data=JSON.parse(this.dataJson)),t("div",null,t("button",null,"Click button"))}static get is(){return"ema-test"}static get properties(){return{data:{state:!0},dataJson:{type:String,attr:"data-json"},el:{elementRef:!0},getData:{method:!0},getId:{method:!0},setData:{method:!0}}}static get events(){return[{name:"change",method:"change",bubbles:!0,cancelable:!0,composed:!0}]}static get style(){return""}}export{a as EmaTest};