import type { ReactElement } from 'react';
import React from 'react';
import { render } from '@testing-library/react-native'; // eslint-disable-line import/no-extraneous-dependencies
import type { RenderOptions } from '@testing-library/react-native';
import { theme } from '../index';
import HeroDesignProvider from '../components/HeroDesignProvider';
import enAU from '../locales/en_AU';

const renderWithTheme = (ui: ReactElement, options?: RenderOptions) =>
  render(
    <HeroDesignProvider theme={theme} locale={enAU}>
      {ui}
    </HeroDesignProvider>,
    options
  );

export default renderWithTheme;
