import{r as t,h as s,f as i,a as e}from"./p-cf6005f1.js";import{E as o}from"./p-9d530225.js";import{D as r}from"./p-545d6d1c.js";var a;(function(t){t["CLOSE"]="CLOSE";t["DATA_UPDATE"]="DATA_UPDATE"})(a||(a={}));const d=".modal-body{display:flex;justify-content:center;align-items:center;padding:16px}.close-button{cursor:pointer;color:#ffff;background-color:#343a40;border-color:#343a40;border-radius:0.25rem;padding:0.375rem 0.75rem;border:1px solid rgba(0, 0, 0, 0)}";const n=d;const c=class{constructor(s){t(this,s);this.eventBus=new o;this.data={isPending:false,title:"",subtitle:""}}async getEventBus(){return this.eventBus}render(){return s("generic-modal",{key:"e7d6f701dea377962b846f350b74f450da0e0ce1",modalTitle:s("div",{"data-testid":r.pendingTransactionsTitle},this.data.title),modalSubtitle:s("div",{"data-testid":r.pendingTransactionsSubtitle},this.data.subtitle),onClose:()=>this.close(),body:s("div",{class:"modal-body"},s("button",{class:"close-button",onClick:()=>this.close()},"Close"))})}close(t={isUserClick:true}){if(t.isUserClick){this.eventBus.publish(a.CLOSE)}if(this.hostElement&&this.hostElement.parentNode){this.hostElement.parentNode.removeChild(this.hostElement)}}dataUpdate(t){if(t.shouldClose){return this.close({isUserClick:false})}this.data=Object.assign({},t);i(this)}componentDidLoad(){this.eventBus.subscribe(a.DATA_UPDATE,this.dataUpdate.bind(this))}disconnectedCallback(){this.eventBus.unsubscribe(a.DATA_UPDATE,this.dataUpdate.bind(this))}get hostElement(){return e(this)}};c.style=n;export{c as pending_transactions_modal};
//# sourceMappingURL=p-473c2b2a.entry.js.map