import * as React from "react";
import ShortcutManager from "./ShortcutManager";

export type PlatformContextType = {
  manager: ShortcutManager;
  notification: string | null;
  notificationTimestamp: number | null;
  setNotification: (notificationWithTimestamp: {
    notification: string;
    timestamp: number;
  }) => any;
  showSidebar: boolean;
  setShowSidebar: (showSidebar: boolean) => any;
};

const PlatformContext = React.createContext<PlatformContextType>({
  manager: new ShortcutManager(),
  notification: null,
  notificationTimestamp: null,
  setNotification: (notificationWithTimestamp: {
    notification: string;
    timestamp: number;
  }) => {},
  showSidebar: false,
  setShowSidebar: (showSidebar: boolean) => {},
});

export default PlatformContext;
