/*!
 * KoliBri - The accessible HTML-Standard
 */
import { h } from "@stencil/core";
import { KolLinkTag } from "../../../core/component-names";
import { bem } from "../../../schema/bem-registry";
const quoteBem = bem.forBlock('kol-quote');
const BEM_CLASS_QUOTE__BLOCKQUOTE = quoteBem('blockquote');
const BEM_CLASS_QUOTE__CITE = quoteBem('cite');
const BEM_CLASS_QUOTE__FIGCAPTION = quoteBem('figcaption');
const BEM_CLASS_QUOTE__QUOTE = quoteBem('quote');
export const QuoteFC = (props) => {
    const { href, label, quote, variant } = props;
    const hasExpertSlot = quote === '';
    const BEM_CLASS_ROOT = quoteBem({ [variant]: true });
    return (h("figure", { class: BEM_CLASS_ROOT }, variant === 'block' ? (h("blockquote", { class: BEM_CLASS_QUOTE__BLOCKQUOTE, cite: href }, quote, h("span", { "aria-hidden": !hasExpertSlot ? 'true' : undefined, hidden: !hasExpertSlot }, h("slot", { name: "expert" })))) : (h("q", { class: BEM_CLASS_QUOTE__QUOTE, cite: href }, quote, h("span", { "aria-hidden": !hasExpertSlot ? 'true' : undefined, hidden: !hasExpertSlot }, h("slot", { name: "expert" })))), typeof label === 'string' && label.length > 0 && (h("figcaption", { class: BEM_CLASS_QUOTE__FIGCAPTION }, h("cite", { class: BEM_CLASS_QUOTE__CITE }, h(KolLinkTag, { _href: href, _label: label, _target: "_blank" }))))));
};
//# sourceMappingURL=component.js.map
