import { parseAsBoolean, useQueryState } from "nuqs";

export const useCreateBoardModal = () => {
  const [isOpen, setIsOpen] = useQueryState(
    "create-board",
    parseAsBoolean.withDefault(false).withOptions({ clearOnDefault: true })
  );

  const open = () => setIsOpen(true);
  const close = () => setIsOpen(false);

  return {
    isOpen,
    open,
    close,
    setIsOpen,
  };
}; 