/*!
 * KoliBri - The accessible HTML-Standard
 */
import{_ as __rest}from"./tslib.es6-2e5096f8.js";import{h}from"./index-a0b4dca2.js";import{c as clsx}from"./clsx-09a06a12.js";const MIN_HEADING_LEVEL=1,MAX_HEADING_LEVEL=6;function isValidHeadingLevel(e){return e>=MIN_HEADING_LEVEL&&e<=6}function getHeadlineTag(e){return isValidHeadingLevel(e)?`h${e}`:"strong"}function getSubHeadlineTag(e){return 1===e?"span":getHeadlineTag(e)}const KolHeadlineFc=(e,s)=>{var{class:a,level:l=MIN_HEADING_LEVEL,variant:n}=e,c=__rest(e,["class","level","variant"]);const i=getHeadlineTag(l),r=n||i;return h(i,Object.assign({class:clsx("headline",`headline-${r}`,a)},c),s)},KolSecondaryHeadlineFc=(e,s)=>{var{class:a,level:l=MIN_HEADING_LEVEL}=e,n=__rest(e,["class","level"]);const c=getSubHeadlineTag(l+1);return h(c,Object.assign({class:clsx("secondary-headline",a)},n),s)},KolHeadingFc=(e,s)=>{var{secondaryHeadline:a,level:l=MIN_HEADING_LEVEL,class:n,HeadingGroupProps:c={},SecondaryHeadlineProps:i={}}=e,r=__rest(e,["secondaryHeadline","level","class","HeadingGroupProps","SecondaryHeadlineProps"]);const t="kol-heading-wc",o=Object.assign({level:l},r);if(!a)return h(KolHeadlineFc,Object.assign({class:clsx(t,n)},o),s);const{class:d}=c,g=__rest(c,["class"]),H=Object.assign({class:clsx(t,d)},g);return h("hgroup",Object.assign({},H),h(KolHeadlineFc,Object.assign({class:n},o),s),h(KolSecondaryHeadlineFc,Object.assign({level:l},i),a))},KolHeadingFc$1=KolHeadingFc;export{KolHeadingFc$1 as K};