import { createContext } from "react";
import type { NullOr } from "../../types";
import type { UnsavedChangesNotifierProps } from "./use-unsaved-changes-notifier";

export interface IUnsavedWarnContextState {
  show: (options: NullOr<UnsavedChangesNotifierProps>) => void;
}

export const UnsavedWarnContext = createContext<NullOr<IUnsavedWarnContextState>>(null);
