/*!
 * KoliBri - The accessible HTML-Standard
 */
import{_ as __rest}from"./tslib.es6-1173d062.js";import{h}from"./index-2ae1c631.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,l)=>{var{class:a,level:s=MIN_HEADING_LEVEL,variant:n}=e,i=__rest(e,["class","level","variant"]);const c=getHeadlineTag(s),o=n||c;return h(c,Object.assign({class:clsx("kol-headline",`kol-headline--${o}`,a)},i),l)},KolSecondaryHeadlineFc=(e,l)=>{var{class:a,level:s=MIN_HEADING_LEVEL}=e,n=__rest(e,["class","level"]);const i=getSubHeadlineTag(s+1);return h(i,Object.assign({class:clsx("kol-headline kol-headline--group kol-headline--secondary",a)},n),l)},KolHeadingFc=(e,l)=>{var{secondaryHeadline:a,level:s=MIN_HEADING_LEVEL,class:n,HeadingGroupProps:i={},SecondaryHeadlineProps:c={}}=e,o=__rest(e,["secondaryHeadline","level","class","HeadingGroupProps","SecondaryHeadlineProps"]);const r=Object.assign({level:s},o);if(!a)return h(KolHeadlineFc,Object.assign({class:clsx(n,"kol-headline--single")},r),l);const{class:d}=i,t=__rest(i,["class"]),g=Object.assign({class:clsx("kol-heading-group",d)},t);return h("hgroup",Object.assign({},g),h(KolHeadlineFc,Object.assign({class:clsx(n,"kol-headline--group","kol-headline--primary")},r),l),h(KolSecondaryHeadlineFc,Object.assign({level:s},c),a))},KolHeadingFc$1=KolHeadingFc;export{KolHeadingFc$1 as K};