import{r as s,d as l,a as o,h as a,e as i,H as n,s as d,g as c}from"./index-BvWOSbaR.js";import{v as r}from"./has-closer-BBMh8HY3-D6JHMwHg.js";import{v as h}from"./label-CdtNxOKu-BgP05vXh.js";import{t as b}from"./i18n-CdSCDnmA-CsM0aySV.js";import{w as f}from"./validation-CW_RXPSn-Dm95zcnn.js";import"./Alert-yh8R3coC-BCYFPt1y.js";import{K as v}from"./Heading-KhwFHPZb-CVH-FD5x.js";import"./markdown-DL-PkOqb-CqqGVzr6.js";import{n as _}from"./dev.utils-0SH3ep_K-BGa3ho47.js";import"./tslib.es6-CxX45GIN-BAJoBDh7.js";import"./clsx-eK3rPvPS-BT_IL7Fz.js";/*!
 * KoliBri - The accessible HTML-Standard
 */const O=class{constructor(e){s(this,e),this.nonce=_(),this.translateClose=b("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(n,{key:"e2e32f376bd12f7fc8beb4df8f76facb80f5e7a5"},a("div",{key:"0ef931bd24c643b575342f434506483f0b3ebca8","aria-labelledby":this.nonce,class:"kol-card",role:"group"},a(v,{key:"ce924a0307338f9d6beaa3ea24051fbb3173d83e",class:"kol-card__header",id:this.nonce,level:this.state._level},this.state._label),a("div",{key:"2d004878aedb826c78acb8834d79144b05ae4d1b",class:"kol-card__content"},a("slot",{key:"c5075d61a16c46bdf3c8c5ffea3ca70cd02c4d8c"})),this.state._hasCloser&&a(i,{key:"89d83b4fb181fb2bd43b7b5a4dfedba1660395b4",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)&&d(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 c(this)}static get watchers(){return{_on:["validateOn"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"]}}};export{O as kol_card_wc};
//# sourceMappingURL=kol-card-wc.entry-Jt_m7RwH.js.map
