import{r as s,d as l,a as o,h as a,e as i,s as c,g as n}from"./index-yJ8X--q8.js";import{v as r}from"./has-closer-DB5qR5TQ-mszbYHeI.js";import{v as d}from"./label-D3d1qqIG-BD7RiEyC.js";import{t as h}from"./i18n-H9CUbi---DysS2qV6.js";import{w as v}from"./validation-C2b7CFWx-BgTAXxIP.js";import"./Alert-DnD_hO6X-DpaZH47L.js";import{K as _}from"./Heading-D_vnx163-UWSZHCcZ.js";import"./markdown-vxO4XBWP-Z_787KZ6.js";import"./clsx-eK3rPvPS-BT_IL7Fz.js";/*!
 * KoliBri - The accessible HTML-Standard
 */const y=class{constructor(e){s(this,e),this.translateClose=h("kol-close"),this.close=()=>{var t;((t=this._on)===null||t===void 0?void 0:t.onClose)!==void 0&&this._on.onClose(new Event("Close")),this.host&&l(this.host,o.close)},this.on={onClick:this.close},this._hasCloser=!1,this._level=0,this.state={_label:""},this.validateOnValue=t=>typeof t=="object"&&t!==null&&typeof t.onClose=="function"}render(){return a("div",{key:"ef5504ce029e993fc34afc9a26a26980f554c4e9",class:"kol-card"},a("div",{key:"23c19a018f8d5808c0a359954ec9e782e2cab51a",class:"kol-card__header"},a(_,{key:"a3042116a0b9bb8e8210712f0a3a7871a1cc6ce2",class:"kol-card__headline",level:this.state._level},this.state._label)),a("div",{key:"5388d429b451ff22536916929797b5fff8e2f388",class:"kol-card__content"},a("slot",{key:"8c337e731d02d9ab714611af0410d0bcdb364025"})),this.state._hasCloser&&a(i,{key:"2342f1be7435a8dc4885825d48555e9f22018310",class:"kol-card__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)&&c(this,"_on",{onClose:e.onClose})}validateHasCloser(e){r(this,e)}validateLabel(e){d(this,e,{required:!0})}validateLevel(e){v(this,e)}componentWillLoad(){this.validateHasCloser(this._hasCloser),this.validateLabel(this._label),this.validateLevel(this._level),this.validateOn(this._on)}get host(){return n(this)}static get watchers(){return{_on:["validateOn"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"]}}};export{y as kol_card_wc};
//# sourceMappingURL=kol-card-wc.entry-DlVfTyFA.js.map
