import{r as s,d as o,a as l,h as a,e as i,H as r,s as n,g as d}from"./index-B6uGkrgD.js";import{v as c}from"./has-closer-BbY1hw6m-BEiGMaH1.js";import{v as h}from"./label-Cw7rCjUo-YeMVw3_3.js";import{t as b}from"./i18n-DvMeCREp-Du7miH0i.js";import{w as v}from"./validation-s-zBxvaI-O3gCOY3s.js";import"./Alert-Yti79ERR-4xSe09mG.js";import{K as _}from"./Heading-D7bFHALO-CWSaVFum.js";import"./component-CPMwSMOM-C0jaO_VE.js";import{n as f}from"./dev.utils-98sTB6ui-O8z9q0jz.js";import"./normalizers-MuBx2xIG-CzHg60vA.js";import"./_Uint8Array-UP73qmmG-BbaGLgZa.js";import"./isArray-CcrBs4JM-CqO_RI43.js";import"./tslib.es6-CxX45GIN-BGVaTf34.js";import"./component-N8_W7bhu-Q1tppvIJ.js";import"./level-C5jpNYbv-DNe4OaAn.js";import"./clsx-COFh-Vc8-D7cYsJM5.js";import"./isObject-BJgq02Md-C3e4t58V.js";const x=class{constructor(e){s(this,e),this.nonce=f(),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&&o(this.host,l.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(r,{key:"966222260e4ea29784efa9ef343eb9b3dfff971d"},a("div",{key:"08b1e2265498c345cbd755dbcaf14ea86d17eb45","aria-labelledby":this.nonce,class:"kol-card",role:"group"},a(_,{key:"d775b403127b7796b64235786769ad00a9cb973d",class:"kol-card__header",id:this.nonce,level:this.state._level},this.state._label),a("div",{key:"2d10431104ac7bd40958c9ab4d74ca02b1021cba",class:"kol-card__content"},a("slot",{key:"af1e1e716e956b8ad52cae3bbb301582344eddc1"})),this.state._hasCloser&&a(i,{key:"ce4e83cfcb423c823d88218f02a4ee47edf1fb30",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)&&n(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 d(this)}static get watchers(){return{_on:["validateOn"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"]}}};export{x as kol_card_wc};
//# sourceMappingURL=kol-card-wc.entry-CzHM6STv.js.map
