/*!
 * KoliBri - The accessible HTML-Standard
 */
import { h } from "@stencil/core";
import clsx from "../../../utils/clsx";
function getHeadlineTag(level) {
    return level >= 1 && level <= 6 ? `h${level}` : 'strong';
}
export const HeadingFC = (props) => {
    const { label, level, secondaryHeadline } = props;
    const HeadlineTag = getHeadlineTag(level);
    if (!secondaryHeadline) {
        return (h(HeadlineTag, { class: clsx('kol-headline', `kol-headline--${HeadlineTag}`, 'kol-headline--single') }, label, h("slot", { name: "expert", slot: "expert" })));
    }
    return (h("hgroup", { class: "kol-heading-group" }, h(HeadlineTag, { class: clsx('kol-headline', `kol-headline--${HeadlineTag}`, 'kol-headline--group', 'kol-headline--primary') }, label, h("slot", { name: "expert", slot: "expert" })), h("p", { class: "kol-headline kol-headline--group kol-headline--secondary" }, secondaryHeadline)));
};
//# sourceMappingURL=component.js.map
