import{r as t,h as o}from"./p-c87337b7.js";const i=class{constructor(o){t(this,o)}onTrigger(t){"close"==t.detail.name&&(t.stopPropagation(),this.notice=void 0)}onUpdatedNotice(t){this.timer&&(window.clearTimeout(this.timer),this.timer=void 0),null!=t&&(this.timer=window.setTimeout(()=>{this.notice=void 0,this.timer=void 0},5e3))}onNotice(t){this.notice=t.detail}render(){const t=this.notice?"string"==typeof this.notice?JSON.parse(this.notice):this.notice:void 0,i=t&&"default"!=t.type?t.type:"primary";return null==t?o("slot",null):[o("slot",null),o("aside",{class:t.type},o("p",null,t.message,o("smoothly-trigger",{color:i,fill:"clear",name:"close"},o("smoothly-icon",{name:"close-circle",color:i}))))]}static get watchers(){return{notice:["onUpdatedNotice"]}}static get style(){return".sc-smoothly-notifier-h{display:block}[hidden].sc-smoothly-notifier-h{display:none}smoothly-trigger.sc-smoothly-notifier{display:inline-block;vertical-align:middle;margin-left:1.5em}aside.sc-smoothly-notifier{text-align:center;vertical-align:middle;width:100%;height:2.8em}aside.warning.sc-smoothly-notifier{background-color:rgb(var(--smoothly-warning-tint));color:rgb(var(--smoothly-warning-contrast))}aside.success.sc-smoothly-notifier{background-color:rgb(var(--smoothly-success-tint));color:rgb(var(--smoothly-success-contrast))}aside.danger.sc-smoothly-notifier{background-color:rgb(var(--smoothly-danger-tint));color:rgb(var(--smoothly-danger-contrast))}aside.default.sc-smoothly-notifier{background-color:rgb(var(--smoothly-primary-tint));color:rgb(var(--smoothly-primary-contrast))}"}};export{i as smoothly_notifier};