import{r as s,d as o,K as l,h as a,c as i,H as r,s as n,g as c}from"./index-Di6F0tPl.js";import{v as d}from"./has-closer-CfUBQHmY-CnNjA2uE.js";import{v as h}from"./label-vxVEH2gH-D6YJvZ98.js";import{t as f}from"./i18n-BVaUp6qp-abSTeW1m.js";import{w as v}from"./validation-CH4ZrnXs-Cud3wOA1.js";import"./Alert-CSsB7kOG-BpPVJBe9.js";import{K as _}from"./Heading-bieqYtyt-BuSeQgau.js";import"./variant-quote-DI6q8gPw-CeInbXEy.js";import"./component-FodZSQiD-0URc9_UY.js";import{n as b}from"./dev.utils-B-ZwZYpj-C6NlZA9W.js";import"./normalizers-C14RETgU-C323STio.js";import"./_Uint8Array-kJHDjtoP-jmGEpw_T.js";import"./isArray-CcrBs4JM-CqO_RI43.js";import"./tslib.es6-CxX45GIN-BGVaTf34.js";import"./component-BoywdBMh-ec-3NjvW.js";import"./level-C9aFQZkd-DFOw2YId.js";import"./clsx-COFh-Vc8-D7cYsJM5.js";const x=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&&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:"f0984f3833782abbe13a62ca23d880128d3b0723"},a("article",{key:"e905f46fd54448352f6ad5cac051f89e51071957","aria-labelledby":this.nonce,class:"kol-card"},a(_,{key:"634ae770b8a4ee24df714a710763233fdb4fe0b5",class:"kol-card__header",id:this.nonce,level:this.state._level},this.state._label),a("div",{key:"91eee8f7f3f5336567b91ae9d5f49fcb1b5b3120",class:"kol-card__content"},a("slot",{key:"ae6b08f8811d7872ea679653298d19fbcfc3ad1c"})),this.state._hasCloser&&a(i,{key:"4c1a4a065a513eeb40c30811587153f987d2a6b8",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){d(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 c(this)}static get watchers(){return{_on:["validateOn"],_hasCloser:["validateHasCloser"],_label:["validateLabel"],_level:["validateLevel"]}}};export{x as kol_card_wc};
//# sourceMappingURL=kol-card-wc.entry-B98xbwg7.js.map
