"use strict";

/**
 * 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.
 */
import { Children } from 'react';
import { View } from 'react-native';
import { atoms as a } from "../styles/index.js";
import { Text } from "../typography/index.js";
import { jsx as _jsx } from "react/jsx-runtime";
export function createTextBubble(Content) {
  return function TextBubble({
    children
  }) {
    const c = Children.toArray(children);
    return /*#__PURE__*/_jsx(Content, {
      label: c.join(' '),
      children: /*#__PURE__*/_jsx(View, {
        style: [a.gap_xs],
        children: c.map((child, i) => /*#__PURE__*/_jsx(Text, {
          style: [a.text_sm, a.leading_snug],
          children: child
        }, i))
      })
    });
  };
}
//# sourceMappingURL=TextBubble.js.map