import { HeadingContext } from './CZ4GFWYL.js';
import { useContext } from 'react';
import { j as jsxRuntimeExports } from '../../../../../../react@18.2.0/node_modules/react/jsx-runtime.js';

function HeadingLevel({ level, children }) {
  const contextLevel = useContext(HeadingContext);
  const nextLevel = Math.max(
    Math.min(level || contextLevel + 1, 6),
    1
  );
  return /* @__PURE__ */ jsxRuntimeExports.jsx(HeadingContext.Provider, { value: nextLevel, children });
}

export { HeadingLevel };
//# sourceMappingURL=5M6RIVE2.js.map
