import { RootState } from "app/store";
import { SnackbarLevel } from "components/snackbar";

export const selectSnackber = (
  state: RootState
): {
  isOpen: boolean;
  level: SnackbarLevel;
  message: string;
  duration?: number;
} => {
  const { isOpen, level, message, duration } = state.ui;

  return { isOpen, level, message, duration };
};
