import{r as s,d as l,a as o,h as a,e as i,H as n,s as d,g as r}from"./index-DpEJCboz.js";import{v as c}from"./has-closer-BbY1hw6m-WI71EiyG.js";import{v as h}from"./label-C18ud7Yt-CZ4vFVQv.js";import{t as f}from"./i18n-DvMeCREp-BgVX-WbF.js";import{w as v}from"./validation-QdERp-08-jrHH5Wwq.js";import"./Alert-BsbKAp99-C_ZQLftv.js";import{K as _}from"./Heading-OHdEuqsD-DAduMFLn.js";import"./markdown-BWEzLPZi-CPJYMM0e.js";import{n as b}from"./dev.utils-khfgdH9Q-PvIox5H6.js";import"./tslib.es6-CxX45GIN-BGVaTf34.js";import"./clsx-COFh-Vc8-D7cYsJM5.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:"3e7074ef91d24bc6d398fd57c455b56c51977609"},a("div",{key:"62f46913ae9a90a468dd3a731dfa3f318ac25f82","aria-labelledby":this.nonce,class:"kol-card",role:"group"},a(_,{key:"f69df4f5bf69cbbabecd468cda9e81294612d1e7",class:"kol-card__header",id:this.nonce,level:this.state._level},this.state._label),a("div",{key:"5cd3a7173e8a210029f0d4196136382f997b9418",class:"kol-card__content"},a("slot",{key:"4adda314f9401771df32d1fd5aa071e5c04a393e"})),this.state._hasCloser&&a(i,{key:"af06b358941c99e6786440cfd224ef5c402192dd",class:"kol-card__close-button kol-close-button","data-testid":"card-close-button",_hideLabel:!0,_icons:{left:{icon:"kolicon-cross"}},_label:this.translateClose,_on:this.on,_tooltipAlign:"left"})))}validateOn(e){this.validateOnValue(e)&&d(this,"_on",{onClose:e.onClose})}validateHasCloser(e){c(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 r(this)}static get watchers(){return{_on:["validateOn"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"]}}};export{O as kol_card_wc};
//# sourceMappingURL=kol-card-wc.entry-zH1Imtby.js.map
