import{r as v,d as c,a as p,h as s,m as _,s as f,g as m,w as l}from"./index-DCi8lcS0.js";import{K as y}from"./Alert-DPSkdS7s-DJ7woqvI.js";import{v as b}from"./has-closer-CtKB8I6M-B3-92-Lr.js";import{v as C}from"./label-pIlPsS_A-DDeB9XCl.js";import{w as u}from"./validation-DiMQDBJs-ZqC6dcDT.js";import"./tslib.es6-CxX45GIN-BGVaTf34.js";import"./i18n-DaJ9SqJN-E9me0qMQ.js";import"./clsx-eK3rPvPS-B-dksMZM.js";import"./Heading-3zpCc-Ye-BV_8CJg5.js";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)},P=class{constructor(t){v(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,d={alert:t,hasCloser:e,label:a,level:r,type:n,variant:h,onCloserClick:this.close,onAlertTimeout:this.handleAlertTimeout};return s(y,Object.assign({key:"5db3514131f644ab76a9bddc438cdf0af412e6e8"},d),s("slot",{key:"61ef793542ae680a090596e44fcb98b9f4e55708"}))}validateAlert(t){_(this,"_alert",t)}validateHasCloser(t){b(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{P as kol_alert_wc};
//# sourceMappingURL=kol-alert-wc.entry-BywQYW4X.js.map
