import{r as d,d as c,a as p,h as s,m as _,s as f,g as m,w as l}from"./index-DscFWUNz.js";import{v as y}from"./has-closer-BBMh8HY3-BfJZyIrp.js";import{v as C}from"./label-CdtNxOKu-DuSxxbJz.js";import{w as u}from"./validation-CW_RXPSn-B3S3ukiD.js";import{K as b}from"./Alert-R2nEqfd2-D16I8H-s.js";import"./Heading-DT8fK42U-BBz359Il.js";import"./i18n-CdSCDnmA-Bln0Fy0B.js";import"./clsx-eK3rPvPS-BT_IL7Fz.js";/*!
 * KoliBri - The accessible HTML-Standard
 */const i=["default","info","success","warning","error"],A=t=>typeof t=="string"&&i.includes(t),g=(t,e)=>{l(t,"_type",A,new Set(i),e)},o=["card","msg"],w=t=>typeof t=="string"&&o.includes(t),T=(t,e)=>{l(t,"_variant",w,new Set(o),e)},j=class{constructor(t){d(this,t),this.close=()=>{var e,a;(a=(e=this._on)===null||e===void 0?void 0:e.onClose)===null||a===void 0||a.call(e,new Event("Close")),this.host&&c(this.host,p.close)},this.handleAlertTimeout=()=>{this.validateAlert(!1)},this._alert=!1,this._hasCloser=!1,this._level=0,this._type="default",this._variant="msg",this.state={_level:0},this.validateOnValue=e=>typeof e=="object"&&e!==null&&typeof e.onClose=="function"}render(){const{_alert:t,_hasCloser:e,_label:a,_level:r,_type:n,_variant:h}=this.state,v={alert:t,hasCloser:e,label:a,level:r,type:n,variant:h,onCloserClick:this.close,onAlertTimeout:this.handleAlertTimeout};return s(b,Object.assign({key:"2f36ca7164492eb43c7942db6e0cb0c231dc9088"},v),s("slot",{key:"626fc6293d159c137669aa44e30a7f122e64f7ef"}))}validateAlert(t){_(this,"_alert",t)}validateHasCloser(t){y(this,t)}validateLabel(t){C(this,t)}validateLevel(t){u(this,t)}validateOn(t){this.validateOnValue(t)&&f(this,"_on",{onClose:t.onClose})}validateType(t){g(this,t)}validateVariant(t){T(this,t)}componentWillLoad(){this.validateAlert(this._alert),this.validateHasCloser(this._hasCloser),this.validateLabel(this._label),this.validateLevel(this._level),this.validateOn(this._on),this.validateType(this._type),this.validateVariant(this._variant)}get host(){return m(this)}static get watchers(){return{_alert:["validateAlert"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"],_on:["validateOn"],_type:["validateType"],_variant:["validateVariant"]}}};export{j as kol_alert_wc};
//# sourceMappingURL=kol-alert-wc.entry-msSyCOPF.js.map
