/*!
 * KoliBri - The accessible HTML-Standard
 */
import{r as t,h as e,H as s}from"./index-5d2ba3a9.js";import{w as a}from"./validation-3745ed01.js";import{K as i}from"./Alert-d9b52149.js";import{b as l,s as r,w as o}from"./prop.validators-64749272.js";import{v as n}from"./has-closer-abdab7af.js";import{v as d}from"./label-e8ec0e3a.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-6ca7e863.js";import"./dev.utils-fab45cbc.js";import"./index-da3e0c00.js";const h=["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:"93a18daf255ec95713c85ec926081163cb70df4a"},e(i,Object.assign({key:"dcfb772612cbe77e683b839474ce1e6e56e22dc4"},d),e("slot",{key:"daaca45ea2680f9f458dd24c41947214f391d8b2"})))}validateAlert(e){l(this,"_alert",e)}validateHasCloser(e){n(this,e)}validateLabel(e){d(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&&h.includes(e)),new Set(`String {${h.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};