/*!
 * KoliBri - The accessible HTML-Standard
 */
"use strict";const tslib_es6=require("./tslib.es6-16e4524f.js"),index=require("./index-b4950b0c.js"),clsx=require("./clsx-dd4d6dd1.js"),i18n=require("./i18n-1d085d07.js"),componentNames=require("./component-names-2c750b1b.js"),dev_utils=require("./dev.utils-58fde089.js"),Icon=({ariaLabel:e,icon:n})=>index.h(index.Fragment,null,index.h("span",{class:"visually-hidden"},e),index.h(componentNames.KolIconTag,{class:"heading-icon",_label:"",_icons:n})),AlertIcon=({type:e,label:n})=>{switch(e){case"error":return index.h(Icon,{ariaLabel:i18n.translate("kol-error"),icon:"codicon codicon-error",label:n});case"info":return index.h(Icon,{ariaLabel:i18n.translate("kol-info"),icon:"codicon codicon-info",label:n});case"warning":return index.h(Icon,{ariaLabel:i18n.translate("kol-warning"),icon:"codicon codicon-warning",label:n});case"success":return index.h(Icon,{ariaLabel:i18n.translate("kol-success"),icon:"codicon codicon-pass",label:n});default:return index.h(Icon,{ariaLabel:i18n.translate("kol-message"),icon:"codicon codicon-comment",label:n})}},AlertIcon$1=AlertIcon,KolAlertFc=(e,n)=>{const{class:l={},type:o="default",variant:i="msg",label:a,hasCloser:c,alert:s,onAlertTimeout:t,onCloserClick:r,level:d}=e,u=tslib_es6.__rest(e,["class","type","variant","label","hasCloser","alert","onAlertTimeout","onCloserClick","level"]);if(s){try{dev_utils.Log.debug(["Navigator should vibrate ...",navigator.vibrate([100,75,100,75,100])])}catch(e){dev_utils.Log.debug("Navigator does not support vibration.")}setTimeout((()=>{null==t||t()}),1e4)}const b=Object.assign({class:clsx.clsx("kol-alert-wc","alert",o,i,{hasCloser:!!c},l),role:s?"alert":void 0},u);return index.h("div",Object.assign({},b),index.h("div",{class:"heading"},index.h(AlertIcon$1,{label:a,type:o}),index.h("div",{class:"heading-content"},a?index.h(componentNames.KolHeadingWcTag,{_label:a,_level:d}):null,"msg"===i&&index.h("div",{class:"content"},n)),c&&index.h(componentNames.KolButtonWcTag,{class:"close",_ariaDescription:(null==a?void 0:a.trim())||"",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:i18n.translate("kol-close-alert"),_on:{onClick:r},_tooltipAlign:"left"})),"card"===i&&index.h("div",{class:"content"},n))},KolAlertFc$1=KolAlertFc;exports.KolAlertFc=KolAlertFc$1;