import{r as v,d as c,K as p,h as l,l as _,s as m,g as f,w as s}from"./index-Bphhj8Un.js";import{K as y}from"./Alert-Cz3oclef-BIIYhuEJ.js";import{v as b}from"./has-closer-CfUBQHmY-DdGBTK32.js";import{v as C}from"./label-vxVEH2gH-Dwt-H9br.js";import{w as u}from"./validation-BytKl095-D7jIw-IH.js";import"./tslib.es6-CxX45GIN-BGVaTf34.js";import"./i18n-BVaUp6qp-Fi24bvte.js";import"./component-_Y75jltB-CMv6bl_H.js";import"./normalizers-DnkJhVYZ-BpYOmfSj.js";import"./_Uint8Array-kJHDjtoP-jmGEpw_T.js";import"./isArray-CcrBs4JM-CqO_RI43.js";import"./clsx-COFh-Vc8-D7cYsJM5.js";import"./Heading-D23yWoVT-AzDQqp1Z.js";import"./level-Bwrb_jzT-DRha3WNY.js";const i=["default","info","success","warning","error"],A=t=>typeof t=="string"&&i.includes(t),g=(t,e)=>{s(t,"_type",A,new Set(i),e)},o=["card","msg"],w=t=>typeof t=="string"&&o.includes(t),T=(t,e)=>{s(t,"_variant",w,new Set(o),e)},F=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 l(y,Object.assign({key:"ab90b52cbda1d61514c3acd292d0bd6d91f0c9d5"},d),l("slot",{key:"6a7e2a89cfabde71c1140d4cf5de28e99bc09ef4"}))}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)&&m(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 f(this)}static get watchers(){return{_alert:["validateAlert"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"],_on:["validateOn"],_type:["validateType"],_variant:["validateVariant"]}}};export{F as kol_alert_wc};
//# sourceMappingURL=kol-alert-wc.entry-BJCodXyx.js.map
