import{r as s,d as l,a as o,h as a,e as i,H as n,s as c,g as d}from"./index-DCi8lcS0.js";import{v as r}from"./has-closer-CtKB8I6M-B3-92-Lr.js";import{v as h}from"./label-pIlPsS_A-DDeB9XCl.js";import{t as f}from"./i18n-DaJ9SqJN-E9me0qMQ.js";import{w as v}from"./validation-DiMQDBJs-ZqC6dcDT.js";import"./Alert-DPSkdS7s-DJ7woqvI.js";import{K as _}from"./Heading-3zpCc-Ye-BV_8CJg5.js";import"./markdown-B2L4G_gq-Bt9CLImC.js";import{n as b}from"./dev.utils-C7mSu-bP-DwZEltMr.js";import"./tslib.es6-CxX45GIN-BGVaTf34.js";import"./clsx-eK3rPvPS-B-dksMZM.js";const O=class{constructor(e){s(this,e),this.nonce=b(),this.translateClose=f("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:"31a21a7dd16b81042127406bc4cd091f16f230d4"},a("div",{key:"22001ed9c1f73d9b6445b0b6e36109c9cc8ef608","aria-labelledby":this.nonce,class:"kol-card",role:"group"},a(_,{key:"5b6760cafee75437ba6ef208d35e05e96ec3f76a",class:"kol-card__header",id:this.nonce,level:this.state._level},this.state._label),a("div",{key:"9b780b199200df0ce78ad4f3d2f1ad746f838a8e",class:"kol-card__content"},a("slot",{key:"cdf53c951f6980b6827db3bf37ea7ad216037c69"})),this.state._hasCloser&&a(i,{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)&&c(this,"_on",{onClose:e.onClose})}validateHasCloser(e){r(this,e)}validateLabel(e){h(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 d(this)}static get watchers(){return{_on:["validateOn"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"]}}};export{O as kol_card_wc};
//# sourceMappingURL=kol-card-wc.entry-BWDIYzwQ.js.map
