/*!
 * KoliBri - The accessible HTML-Standard
 */
import{r as e,h as s,H as a}from"./index-12b1e13a.js";import{w as t}from"./validation-14b61e5a.js";import{w as i,i as n}from"./prop.validators-9feb1d92.js";import{a as r}from"./label-d0315384.js";import"./index-da3e0c00.js";import"./dev.utils-fab45cbc.js";const h=["h1","h2","h3","h4","h5","h6","strong"],l=(e,a)=>{i(e,"_variant",(e=>"string"==typeof e&&h.includes(e)),new Set([`KoliBriHeadingVariant {${h.join(", ")}`]),a)},d=class{constructor(a){e(this,a),this.renderHeadline=(e,a)=>{const t="number"==typeof a&&a>0&&a<=6?`h${a}`:"strong",i=this._variant||t;return s(t,{class:{headline:!0,[`headline-${i}`]:!0}},e,s("slot",{name:"expert"}))},this.renderSecondaryHeadline=(e,a)=>{switch(a){case 1:return s("span",{class:"secondary-headline"},e);case 2:return s("h2",{class:"secondary-headline"},e);case 3:return s("h3",{class:"secondary-headline"},e);case 4:return s("h4",{class:"secondary-headline"},e);case 5:return s("h5",{class:"secondary-headline"},e);case 6:return s("h6",{class:"secondary-headline"},e);default:return s("strong",{class:"secondary-headline"},e)}},this._label=void 0,this._level=1,this._secondaryHeadline=void 0,this._variant=void 0,this.state={_label:"",_level:1}}validateLabel(e){r(this,e)}validateLevel(e){t(this,e)}validateSecondaryHeadline(e){n(this,"_secondaryHeadline",e)}validateVariant(e){l(this,e)}componentWillLoad(){this.validateLabel(this._label),this.validateLevel(this._level),this.validateSecondaryHeadline(this._secondaryHeadline),this.validateVariant(this._variant)}render(){return s(a,{key:"75310ad926eb6df8edda1a563550596e11eee373",class:"kol-heading-wc"},"string"==typeof this.state._secondaryHeadline&&this.state._secondaryHeadline.length>0?s("hgroup",null,this.renderHeadline(this.state._label,this.state._level),this.state._secondaryHeadline&&this.renderSecondaryHeadline(this.state._secondaryHeadline,this.state._level+1)):this.renderHeadline(this.state._label,this.state._level))}static get watchers(){return{_label:["validateLabel"],_level:["validateLevel"],_secondaryHeadline:["validateSecondaryHeadline"],_variant:["validateVariant"]}}};export{d as kol_heading_wc};