"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.createTextBubble = createTextBubble;
var _react = require("react");
var _reactNative = require("react-native");
var _index = require("../styles/index.js");
var _index2 = require("../typography/index.js");
var _jsxRuntime = require("react/jsx-runtime");
/**
 * Shared TextBubble factory for Tooltip (native + web).
 *
 * Returns a TextBubble component bound to the platform-specific Content
 * component, avoiding circular imports between TextBubble and the
 * platform entry points.
 */

function createTextBubble(Content) {
  return function TextBubble({
    children
  }) {
    const c = _react.Children.toArray(children);
    return /*#__PURE__*/(0, _jsxRuntime.jsx)(Content, {
      label: c.join(' '),
      children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
        style: [_index.atoms.gap_xs],
        children: c.map((child, i) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Text, {
          style: [_index.atoms.text_sm, _index.atoms.leading_snug],
          children: child
        }, i))
      })
    });
  };
}
//# sourceMappingURL=TextBubble.js.map