import { ReactNode } from 'react';
import { ModalsProvider } from '@mantine/modals';
import MarketplaceFormModal from '@/pages/marketplaces/modals/MarketplaceFormModal/MarketplaceFormModal';

type Props = {
  children: ReactNode;
};
const modals = {
  marketplaceForm: MarketplaceFormModal,
};
declare module '@mantine/modals' {
  export interface MantineModalsOverride {
    modals: typeof modals;
  }
}
const MantineModalsProvider = ({ children }: Props) => {
  return (
    <ModalsProvider labels={{ cancel: 'Отменить', confirm: 'Подтвердить' }} modals={modals}>
      {children}
    </ModalsProvider>
  );
};
export default MantineModalsProvider;
