/*!
 * KoliBri - The accessible HTML-Standard
 */
"use strict";var index=require("./index-D0FxsaCe.js"),common=require("./common-Cd2qH809.js"),hasCloser=require("./has-closer-COtNvUI4.js"),label=require("./label-Nicf9N_T.js"),i18n=require("./i18n-DNWGj4j8.js"),validation=require("./validation-DsxRnVmU.js"),componentNames=require("./component-names-CuI-0Pbo.js");require("./Alert-BtlJVPF2.js");var Heading=require("./Heading-CsroEQcs.js");require("./markdown-1dxeA2q6.js");var dev_utils=require("./dev.utils-CQRxSjO9.js"),events=require("./events-cX8h6I3p.js");require("./i18n-BnIFsVIa.js"),require("./tslib.es6-7DbU_BSw.js"),require("./clsx-CkZlkaek.js"),require("./bem-CWXmxX43.js"),require("./browser-D7A31aEp.js");const KolCardWc=class{constructor(e){index.registerInstance(this,e),this.nonce=dev_utils.nonce(),this.translateClose=i18n.translate("kol-close"),this.close=()=>{var e;void 0!==(null===(e=this._on)||void 0===e?void 0:e.onClose)&&this._on.onClose(new Event("Close")),this.host&&events.dispatchDomEvent(this.host,events.KolEvent.close)},this.on={onClick:this.close},this._hasCloser=!1,this._level=0,this.state={_label:""},this.validateOnValue=e=>"object"==typeof e&&null!==e&&"function"==typeof e.onClose}render(){return index.h(index.Host,{key:"31a21a7dd16b81042127406bc4cd091f16f230d4"},index.h("div",{key:"22001ed9c1f73d9b6445b0b6e36109c9cc8ef608","aria-labelledby":this.nonce,class:"kol-card",role:"group"},index.h(Heading.KolHeadingFc,{key:"5b6760cafee75437ba6ef208d35e05e96ec3f76a",class:"kol-card__header",id:this.nonce,level:this.state._level},this.state._label),index.h("div",{key:"9b780b199200df0ce78ad4f3d2f1ad746f838a8e",class:"kol-card__content"},index.h("slot",{key:"cdf53c951f6980b6827db3bf37ea7ad216037c69"})),this.state._hasCloser&&index.h(componentNames.KolButtonWcTag,{key:"dd2b363336c1f891f7c6dfa4a46eca9ab1850dcf",class:"kol-card__close-button kol-close-button","data-testid":"card-close-button",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:this.translateClose,_on:this.on,_tooltipAlign:"left"})))}validateOn(e){this.validateOnValue(e)&&common.setState(this,"_on",{onClose:e.onClose})}validateHasCloser(e){hasCloser.validateHasCloser(this,e)}validateLabel(e){label.validateLabel(this,e,{required:!0})}validateLevel(e){validation.watchHeadingLevel(this,e)}componentWillLoad(){this.validateHasCloser(this._hasCloser),this.validateLabel(this._label),this.validateLevel(this._level),this.validateOn(this._on)}get host(){return index.getElement(this)}static get watchers(){return{_on:["validateOn"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"]}}};exports.kol_card_wc=KolCardWc;