"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.h6LineHeight = exports.h6FontSize = exports.H6 = void 0;
var _react = require("react");
var _context = require("../../context");
var _IOText = require("./IOText");
var _jsxRuntime = require("react/jsx-runtime");
const h6FontSize = exports.h6FontSize = 16;
const h6LineHeight = exports.h6LineHeight = 24;

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

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