/*!
 * KoliBri - The accessible HTML-Standard
 */
"use strict";const tslib_es6=require("./tslib.es6-5e301284.js"),index=require("./index-87a7393a.js"),clsx=require("./clsx-dd4d6dd1.js"),i18n=require("./i18n-1d085d07.js"),componentNames=require("./component-names-cf0c0d8a.js"),Heading=require("./Heading-d79de8bf.js"),Icon=({ariaLabel:e,icon:l})=>index.h(componentNames.KolIconTag,{class:"kol-alert__heading-icon",_label:e,_icons:l}),AlertIcon=({type:e,label:l})=>{switch(e){case"error":return index.h(Icon,{ariaLabel:i18n.translate("kol-error"),icon:"codicon codicon-error",label:l});case"info":return index.h(Icon,{ariaLabel:i18n.translate("kol-info"),icon:"codicon codicon-info",label:l});case"warning":return index.h(Icon,{ariaLabel:i18n.translate("kol-warning"),icon:"codicon codicon-warning",label:l});case"success":return index.h(Icon,{ariaLabel:i18n.translate("kol-success"),icon:"codicon codicon-pass",label:l});default:return index.h(Icon,{ariaLabel:i18n.translate("kol-message"),icon:"codicon codicon-comment",label:l})}},AlertIcon$1=AlertIcon,KolAlertFc=(e,l)=>{var n,o;const{class:a={},type:i="default",variant:t="msg",label:c,hasCloser:r,alert:s,onAlertTimeout:d,onCloserClick:u,level:b}=e,v=tslib_es6.__rest(e,["class","type","variant","label","hasCloser","alert","onAlertTimeout","onCloserClick","level"]);s&&((null===(n=navigator.userActivation)||void 0===n?void 0:n.hasBeenActive)&&(null===(o=null===navigator||void 0===navigator?void 0:navigator.vibrate)||void 0===o||o.call(navigator,[100,75,100,75,100])),setTimeout((()=>{null==d||d()}),1e4));const _=Object.assign({class:clsx.clsx("kol-alert",`kol-alert--${i}`,`kol-alert--${t}`,{"kol-alert--hasCloser":!!r},a),role:s?"alert":void 0},v);return index.h("div",Object.assign({},_),index.h("div",{class:"kol-alert__container"},index.h(AlertIcon$1,{label:c,type:i}),index.h("div",{class:"kol-alert__container-content"},c?index.h(Heading.KolHeadingFc,{class:"kol-alert__heading",level:b},c):null,"msg"===t&&index.h("div",{class:"kol-alert__content"},l)),r&&index.h(componentNames.KolButtonWcTag,{class:"kol-alert__close-button close","data-testid":"alert-close-button",_ariaDescription:(null==c?void 0:c.trim())||"",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:i18n.translate("kol-close-alert"),_on:{onClick:u},_tooltipAlign:"left"})),"card"===t&&index.h("div",{class:"kol-alert__content"},l))},KolAlertFc$1=KolAlertFc;exports.KolAlertFc=KolAlertFc$1;