/*!
 * KoliBri - The accessible HTML-Standard
 */
import{r as e,h as a,H as s}from"./index-5d2ba3a9.js";import{w as t}from"./validation-3745ed01.js";import{w as i,i as n}from"./prop.validators-64749272.js";import{a as r}from"./label-e8ec0e3a.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(t){e(this,t),this.renderHeadline=(e,t)=>{const s="number"==typeof t&&t>0&&t<=6?`h${t}`:"strong",i=this._variant||s;return a(s,{class:{headline:!0,[`headline-${i}`]:!0}},e,a("slot",{name:"expert"}))},this.renderSecondaryHeadline=(e,t)=>{switch(t){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){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 a(s,{key:"e7bbeab369d3089ea0c1e7ca52e8bb97720ec061",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{d as kol_heading_wc};