"use strict";
const jsxRuntime = require("react/jsx-runtime");
const React = require("react");
const styles_lib_components_Accordion_AccordionItem_cjs = require("../Accordion/AccordionItem.cjs");
const styles_lib_css_typography_css_cjs = require("../../css/typography.css.cjs");
const HeadingContext = React.createContext(false);
const resolveDefaultComponent = {
  "1": "h1",
  "2": "h2",
  "3": "h3",
  "4": "h4"
};
const Heading = ({
  level,
  weight,
  component,
  ...typographyProps
}) => /* @__PURE__ */ jsxRuntime.jsx(HeadingContext.Provider, { value: true, children: /* @__PURE__ */ jsxRuntime.jsx(
  styles_lib_components_Accordion_AccordionItem_cjs.Typography,
  {
    ...typographyProps,
    component: component || resolveDefaultComponent[level],
    className: [
      styles_lib_css_typography_css_cjs.fontFamily,
      styles_lib_css_typography_css_cjs.headingWeight[weight || "regular"],
      styles_lib_css_typography_css_cjs.heading[level],
      styles_lib_css_typography_css_cjs.tone.neutral
    ]
  }
) });
exports.Heading = Heading;
exports.HeadingContext = HeadingContext;
