/*!
 * KoliBri - The accessible HTML-Standard
 */
import{r as e,h as a,H as s}from"./index-9ca46203.js";import{S as t,A as i,aH as n}from"./index-0489af72.js";import{w as r}from"./validation-7e615a5b.js";const h=class{constructor(s){e(this,s),this.renderHeadline=(e,s)=>{const t="number"==typeof s&&s>0&&s<=6?`h${s}`:"strong",i=this._variant||t;return a(t,{class:{headline:!0,[`headline-${i}`]:!0}},e,a("slot",{name:"expert"}))},this.renderSecondaryHeadline=(e,s)=>{switch(s){case 1:return a("span",{class:"secondary-headline"},e);case 2:return a("h2",{class:"secondary-headline"},e);case 3:return a("h3",{class:"secondary-headline"},e);case 4:return a("h4",{class:"secondary-headline"},e);case 5:return a("h5",{class:"secondary-headline"},e);case 6:return a("h6",{class:"secondary-headline"},e);default:return a("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){t(this,e)}validateLevel(e){r(this,e)}validateSecondaryHeadline(e){i(this,"_secondaryHeadline",e)}validateVariant(e){n(this,e)}componentWillLoad(){this.validateLabel(this._label),this.validateLevel(this._level),this.validateSecondaryHeadline(this._secondaryHeadline),this.validateVariant(this._variant)}render(){return a(s,{key:"dfa23477ebaa707f973814ee68826a5447ee8fe8",class:"kol-heading-wc"},"string"==typeof this.state._secondaryHeadline&&this.state._secondaryHeadline.length>0?a("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{h as kol_heading_wc};