import { type RenderOptions, render as renderUi } from '@testing-library/react'
import type { ReactNode } from 'react'

import { I18nProvider } from '@/i18n/context'

/** Component behavior fixtures use English explicitly; application-default
 * and Turkish rendering are verified by the locale integration tests. */
export function renderWithEnglish(ui: ReactNode, options?: RenderOptions) {
  return renderUi(ui, {
    wrapper: ({ children }) => (
      <I18nProvider configClient={null} initialLocale="en">
        {children}
      </I18nProvider>
    ),
    ...options
  })
}
