import{r as s,d as l,a as o,h as a,e as i,H as c,s as n,g as d}from"./index-DscFWUNz.js";import{v as r}from"./has-closer-BBMh8HY3-BfJZyIrp.js";import{v as h}from"./label-CdtNxOKu-DuSxxbJz.js";import{t as v}from"./i18n-CdSCDnmA-Bln0Fy0B.js";import{w as f}from"./validation-CW_RXPSn-B3S3ukiD.js";import"./Alert-R2nEqfd2-D16I8H-s.js";import{K as _}from"./Heading-DT8fK42U-BBz359Il.js";import"./markdown-DL-PkOqb-zRCMnbWa.js";import{n as b}from"./dev.utils-Bbi3sn8s-CRUPlhXY.js";import"./clsx-eK3rPvPS-BT_IL7Fz.js";/*!
 * KoliBri - The accessible HTML-Standard
 */const K=class{constructor(e){s(this,e),this.nonce=b(),this.translateClose=v("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(c,{key:"de517413c990072e7e7faca2916c0c5243ad9495"},a("div",{key:"01f98d52d173677f5e314e2dce9425cc19cdaadc","aria-labelledby":this.nonce,class:"kol-card",role:"group"},a(_,{key:"d2ce693140449135323ff1601af712982aae9325",class:"kol-card__header",id:this.nonce,level:this.state._level},this.state._label),a("div",{key:"155c2d42406dbb9ba02f6a29ec92f10d93b8c38d",class:"kol-card__content"},a("slot",{key:"f3c23f1168273dbfbb515b1d83b7f087d9d019ca"})),this.state._hasCloser&&a(i,{key:"7c9ebe3b241019c157161bfb2f5562a0ce482c09",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)&&n(this,"_on",{onClose:e.onClose})}validateHasCloser(e){r(this,e)}validateLabel(e){h(this,e,{required:!0})}validateLevel(e){f(this,e)}componentWillLoad(){this.validateHasCloser(this._hasCloser),this.validateLabel(this._label),this.validateLevel(this._level),this.validateOn(this._on)}get host(){return d(this)}static get watchers(){return{_on:["validateOn"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"]}}};export{K as kol_card_wc};
//# sourceMappingURL=kol-card-wc.entry-Ciw7Fjbs.js.map
