import React, { ComponentProps } from 'react';
import type { Trans as TransCompType } from '@wix/fe-essentials/react';
import { useWixPatternsContainer } from '@wix/bex-core/react';

export type TransProps = Omit<ComponentProps<typeof TransCompType>, 'i18n'>;

export const Trans = (props: TransProps) => {
  const { Trans: TransComp, i18n } = useWixPatternsContainer();

  return <TransComp i18n={i18n} {...props} />;
};
