import { parseAsString, useQueryState } from "nuqs";

export const useEditEpicModal = () => {
  const [epicId, setEpicId] = useQueryState(
    "edit-epic",
    parseAsString.withOptions({ clearOnDefault: true }),
  );

  const open = (id: string) => setEpicId(id);
  const close = () => setEpicId(null);

  return {
    epicId,
    isOpen: !!epicId,
    open,
    close,
    setEpicId,
  };
}; 