import React from 'react';
import { Text, View } from 'react-native';
import { useTheme } from '../../contexts/theme';
const CardWatermark = _ref => {
  let {
    watermark,
    style,
    height,
    width
  } = _ref;
  const {
    TextTheme
  } = useTheme();
  const fontSize = Number((style === null || style === void 0 ? void 0 : style.fontSize) ?? TextTheme.normal.fontSize);
  const watermarkText = `${watermark} `.repeat(Math.ceil(width / (Math.cos(30) * (fontSize / 2 * (watermark.length + 1)))));
  return /*#__PURE__*/React.createElement(View, {
    style: {
      position: 'absolute',
      left: '-50%',
      top: '-100%',
      width: '200%',
      height: '200%'
    }
  }, Array.from({
    length: Math.ceil(height * 2 / fontSize + 1)
  }).map((_, i) => /*#__PURE__*/React.createElement(Text, {
    accessible: false,
    key: i,
    numberOfLines: 1,
    style: style
  }, watermarkText)));
};
export default CardWatermark;
//# sourceMappingURL=CardWatermark.js.map