import { useCallback, useState } from "react";

export function useDrawer(initialOpen = false) {
  const [open, setOpen] = useState(initialOpen);
  const openDrawer = useCallback(() => setOpen(true), []);
  const closeDrawer = useCallback(() => setOpen(false), []);
  return { open, openDrawer, closeDrawer };
}
