import{r as s,g as e,h as a}from"./p-e42dfa95.js";const t={success:"✓",warning:"⚠",info:"ℹ",error:"✕",loading:"⏳"};const i=class{constructor(e){s(this,e)}get el(){return e(this)}message="";type="info";closable=false;duration=3e3;visible=true;componentDidLoad(){if(this.duration>0){setTimeout((()=>this.close()),this.duration)}}close=()=>{this.visible=false;setTimeout((()=>this.el.remove()),300)};render(){return a("div",{key:"51069b8f2a5079fcfd64bb24168907bbcfbfd869",class:{"hb-message":true,[`hb-message--${this.type}`]:true,"hb-message--visible":this.visible},role:"alert"},a("span",{key:"ad3123ae0c4eb9b8010c446bf0016d54af7b8a3a",class:"hb-message__icon"},t[this.type]),a("span",{key:"557ea0f92544ab58079a498b8f90dc774746c0a2",class:"hb-message__text"},this.message),this.closable&&a("span",{key:"e90e3380ba2b9a473d5f839983b959584948fd2a",class:"hb-message__close",onClick:this.close},"×"))}};export{i as hb_message};
//# sourceMappingURL=p-953b9514.entry.js.map