"use strict";

import React, { memo } from 'react';
import { Text as RNText, View, Platform } from 'react-native';
import { useTheme } from "../theme/use-theme.js";
import { jsx as _jsx } from "react/jsx-runtime";
/**
 * Block-level monospace text — render as `<pre>` on web (CSS var family)
 * and `<View><Text fontFamily="Geist Mono"></View>` on native.
 */
const PreComponent = function Pre({
  children,
  containerStyle,
  style,
  ...rest
}) {
  const {
    colors
  } = useTheme();
  if (Platform.OS === 'web') {
    return /*#__PURE__*/React.createElement('pre', {
      ...rest,
      style: {
        fontFamily: 'var(--bloom-font-mono)',
        fontSize: '0.92em',
        color: colors.text,
        backgroundColor: colors.backgroundSecondary,
        padding: '12px 16px',
        borderRadius: 8,
        overflow: 'auto',
        margin: 0,
        ...containerStyle,
        ...style
      }
    }, children);
  }
  return /*#__PURE__*/_jsx(View, {
    style: [{
      backgroundColor: colors.backgroundSecondary,
      padding: 12,
      borderRadius: 8
    }, containerStyle],
    children: /*#__PURE__*/_jsx(RNText, {
      ...rest,
      style: [{
        fontFamily: 'Geist Mono',
        fontSize: 13,
        color: colors.text
      }, style],
      children: children
    })
  });
};
export const Pre = /*#__PURE__*/memo(PreComponent);
Pre.displayName = 'Pre';
//# sourceMappingURL=Pre.js.map