"use client";
'use strict';

var CZ4GFWYL = require('./CZ4GFWYL.cjs');
var React = require('react');
var jsxRuntime = require('react/jsx-runtime');

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

exports.HeadingLevel = HeadingLevel;
//# sourceMappingURL=5M6RIVE2.cjs.map
