"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
const designSystem = require("@choiceform/design-system");
const React = require("react");
const tv = require("./tv.cjs");
const promptInputContext = require("../../context/prompt-input-context.cjs");
const PromptCharacterCount = React.memo(function PromptCharacterCount2(props) {
  const { children, className } = props;
  const { inputValue } = promptInputContext.usePromptInputContext();
  const charCount = inputValue.text.length;
  const tv$1 = tv.promptCharacterCountTv();
  if (charCount === 0) return null;
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: designSystem.tcx(tv$1.root(), className), children: children ? children(charCount) : charCount });
});
exports.PromptCharacterCount = PromptCharacterCount;
//# sourceMappingURL=prompt-character-count.cjs.map
