"use strict";

import React, { memo } from 'react';
import { Text as RNText, Platform } from 'react-native';
import { useTheme } from "../theme/use-theme.js";
import { jsx as _jsx } from "react/jsx-runtime";
/**
 * Inline monospace text — render as `<code>` on web (CSS var family) and
 * `<Text fontFamily="Geist Mono">` on native.
 */
const CodeComponent = function Code({
  children,
  style,
  ...rest
}) {
  const {
    colors
  } = useTheme();
  if (Platform.OS === 'web') {
    return /*#__PURE__*/React.createElement('code', {
      ...rest,
      style: {
        fontFamily: 'var(--bloom-font-mono)',
        fontSize: '0.92em',
        color: colors.text,
        ...style
      }
    }, children);
  }
  return /*#__PURE__*/_jsx(RNText, {
    ...rest,
    style: [{
      fontFamily: 'Geist Mono',
      fontSize: 13,
      color: colors.text
    }, style],
    children: children
  });
};
export const Code = /*#__PURE__*/memo(CodeComponent);
Code.displayName = 'Code';
//# sourceMappingURL=Code.js.map