"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const React = require("react");
function useLineCount(children) {
  const [lineCount, setLineCount] = React.useState(0);
  React.useEffect(() => {
    const codeContent = React.Children.toArray(children).map((child) => {
      if (React.isValidElement(child) && child.props.code) {
        return child.props.code;
      }
      return "";
    }).join("");
    if (codeContent) {
      const lines = codeContent.split("\n").length;
      setLineCount(lines);
    }
  }, [children]);
  return lineCount;
}
exports.useLineCount = useLineCount;
//# sourceMappingURL=use-line-count.cjs.map
