import type { Dispatch, SetStateAction } from "react" export enum AnimationStateEnum { unmounted = "unmounted", hidden = "hidden", visible = "visible", } export type AnimationState = keyof typeof AnimationStateEnum export type ModalProps = { onAnimationComplete?: VoidFunction title?: string subtitle?: string } & ( | { trigger: JSX.Element; isOpen?: never; onToggle?: never } | { trigger?: never isOpen: boolean onToggle: Dispatch> } ) export type InnerModalProps = Omit & { animation: AnimationState setAnimation: Dispatch> }