import { createContext } from 'react';

import { SnackbarProps } from './Snackbar';

export type SnackbarContextType = {
  createSnackbar: (props: Omit<SnackbarProps, 'timeout' | 'timestamp'>) => void;
};

export const SnackbarContext = createContext<SnackbarContextType>({ createSnackbar: () => {} });

export const SnackbarConsumer = SnackbarContext.Consumer;
