import { Context, createContext } from "react";

interface DrawerContextType {
  isOpen: boolean;
  onClose: () => void;
  isClosedAtRest: boolean;
  drawerSide: "left" | "right";
}

const defaultContext: DrawerContextType = {
  isOpen: false,
  onClose: () => {},
  isClosedAtRest: false,
  drawerSide: "left",
};

export const DrawerContext: Context<DrawerContextType> = createContext<DrawerContextType>(
  defaultContext,
);
