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-Bphhj8Un.js";import{v as d}from"./has-closer-CfUBQHmY-DdGBTK32.js";import{v as h}from"./label-vxVEH2gH-Dwt-H9br.js";import{t as v}from"./i18n-BVaUp6qp-Fi24bvte.js";import{w as _}from"./validation-BytKl095-D7jIw-IH.js";import"./Alert-Cz3oclef-BIIYhuEJ.js";import{K as f}from"./Heading-D23yWoVT-AzDQqp1Z.js";import"./variant-quote-CHD0qMkY-Di-MtwAe.js";import"./component-sn_z4L8i-BDtwqac9.js";import{n as m}from"./dev.utils-BKmnA1fy-DpWKEgND.js";import"./normalizers-DnkJhVYZ-BpYOmfSj.js";import"./_Uint8Array-kJHDjtoP-jmGEpw_T.js";import"./isArray-CcrBs4JM-CqO_RI43.js";import"./tslib.es6-CxX45GIN-BGVaTf34.js";import"./component-_Y75jltB-CMv6bl_H.js";import"./level-Bwrb_jzT-DRha3WNY.js";import"./clsx-COFh-Vc8-D7cYsJM5.js";const x=class{constructor(e){s(this,e),this.nonce=m(),this.translateClose=v("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:"86c82a7e8d83d70bc962d5d342899df8533b2b1f"},a("div",{key:"41d559fcb496559361276d4798d95dfafe40e2a8","aria-labelledby":this.nonce,class:"kol-card",role:"group"},a(f,{key:"078a94d83766a1e34a9ec14c61b30445cb50099d",class:"kol-card__header",id:this.nonce,level:this.state._level},this.state._label),a("div",{key:"3f03cad48ea63955dd19fc0f4944f8a290aac9bc",class:"kol-card__content"},a("slot",{key:"a35c05a3e98cd9aa272f25c4437a2336f9cd7ae5"})),this.state._hasCloser&&a(i,{key:"69a65898c7018960828c589eeaf3a0eaa56326e1",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){_(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-BNWCULLd.js.map
