"use strict";

import { forwardRef } from "react";
import { useIONewTypeface, useIOTheme } from "../../context";
import { IOText } from "./IOText";
import { jsx as _jsx } from "react/jsx-runtime";
export const h6FontSize = 16;
export const h6LineHeight = 24;

// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
const legacyFontSize = 17;

/**
 * `H6` typographic style
 */
export const H6 = /*#__PURE__*/forwardRef(({
  color: customColor,
  ...props
}, ref) => {
  const theme = useIOTheme();
  const {
    newTypefaceEnabled
  } = useIONewTypeface();
  const H6Props = {
    ...props,
    dynamicTypeRamp: "headline",
    // iOS only
    weight: "Semibold",
    size: newTypefaceEnabled ? h6FontSize : legacyFontSize,
    lineHeight: h6LineHeight,
    color: customColor ?? theme["textHeading-default"]
  };
  return /*#__PURE__*/_jsx(IOText, {
    ref: ref,
    ...H6Props,
    children: props.children
  });
});
//# sourceMappingURL=H6.js.map