/*!
 * KoliBri - The accessible HTML-Standard
 */
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-f0fde70b.js"),index$1=require("./index-cb2ce614.js"),validation=require("./validation-dd7406a2.js"),KolHeadingWc=class{constructor(e){index.registerInstance(this,e),this.renderHeadline=(e,a)=>{const i="number"==typeof a&&a>0&&a<=6?`h${a}`:"strong",t=this._variant||i;return index.h(i,{class:{headline:!0,[`headline-${t}`]:!0}},e,index.h("slot",{name:"expert"}))},this.renderSecondaryHeadline=(e,a)=>{switch(a){case 1:return index.h("span",{class:"secondary-headline"},e);case 2:return index.h("h2",{class:"secondary-headline"},e);case 3:return index.h("h3",{class:"secondary-headline"},e);case 4:return index.h("h4",{class:"secondary-headline"},e);case 5:return index.h("h5",{class:"secondary-headline"},e);case 6:return index.h("h6",{class:"secondary-headline"},e);default:return index.h("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){index$1.validateLabelWithExpertSlot(this,e)}validateLevel(e){validation.watchHeadingLevel(this,e)}validateSecondaryHeadline(e){index$1.watchString(this,"_secondaryHeadline",e)}validateVariant(e){index$1.validateHeadingVariant(this,e)}componentWillLoad(){this.validateLabel(this._label),this.validateLevel(this._level),this.validateSecondaryHeadline(this._secondaryHeadline),this.validateVariant(this._variant)}render(){return index.h(index.Host,{key:"dfa23477ebaa707f973814ee68826a5447ee8fe8",class:"kol-heading-wc"},"string"==typeof this.state._secondaryHeadline&&this.state._secondaryHeadline.length>0?index.h("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"]}}};exports.kol_heading_wc=KolHeadingWc;