/*!
 * KoliBri - The accessible HTML-Standard
 */
import{r as t,h as e,H as s}from"./index-12b1e13a.js";import{w as a}from"./validation-14b61e5a.js";import{K as i}from"./Alert-5705426b.js";import{b as l,s as r,w as o}from"./prop.validators-9feb1d92.js";import{v as n}from"./has-closer-a4e62c58.js";import{v as h}from"./label-d0315384.js";import"./tslib.es6-2e5096f8.js";import"./clsx-09a06a12.js";import"./i18n-5fe08f1c.js";import"./i18n-7ea9f137.js";import"./reuse-32931294.js";import"./component-names-d278f819.js";import"./dev.utils-fab45cbc.js";import"./index-da3e0c00.js";const d=["default","info","success","warning","error"],c=["card","msg"],v=class{constructor(e){t(this,e),this.close=()=>{var e,t;null===(t=null===(e=this._on)||void 0===e?void 0:e.onClose)||void 0===t||t.call(e,new Event("Close"))},this.handleAlertTimeout=()=>{this.validateAlert(!1)},this.validateOnValue=e=>"object"==typeof e&&null!==e&&"function"==typeof e.onClose,this._alert=!1,this._hasCloser=!1,this._label=void 0,this._level=1,this._on=void 0,this._type="default",this._variant="msg",this.state={_level:1}}render(){const{_alert:t,_hasCloser:a,_label:l,_level:o,_type:r,_variant:n}=this.state,d={alert:t,hasCloser:a,label:l,level:o,type:r,variant:n,onCloserClick:this.close,onAlertTimeout:this.handleAlertTimeout};return e(s,{key:"477b8787c6570a9adae125553184e0273200583f"},e(i,Object.assign({key:"723d3d05c035e3280e59c92051fe72c2f11a7b96"},d),e("slot",{key:"c44a3281ce03a71d68e967a2c2a5ffd7f2dfc2ec"})))}validateAlert(e){l(this,"_alert",e)}validateHasCloser(e){n(this,e)}validateLabel(e){h(this,e)}validateLevel(e){a(this,e)}validateOn(e){this.validateOnValue(e)&&r(this,"_on",{onClose:e.onClose})}validateType(e){o(this,"_type",(e=>"string"==typeof e&&d.includes(e)),new Set(`String {${d.join(", ")}`),e)}validateVariant(e){o(this,"_variant",(e=>"string"==typeof e&&c.includes(e)),new Set(`AlertVariant {${c.join(", ")}`),e)}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)}static get watchers(){return{_alert:["validateAlert"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"],_on:["validateOn"],_type:["validateType"],_variant:["validateVariant"]}}};export{v as kol_alert_wc};