import type { ReactNode, RefAttributes, SyntheticEvent } from "react";
import type { ModalElementType } from "./Modal";

export interface ModalProps extends RefAttributes<ModalElementType> {
  isOpen: boolean;
  onOpen?: () => void;
  onClose?: () => void;
  preventEscapeKey?: boolean;
  children?: ReactNode;
  className?: string;
  closeLabel?: string;
  animation?: "slideUp" | "fade";
  isFullScreen?: boolean;
}

export type ModalContextProps = {
  onClose: (event?: SyntheticEvent<HTMLElement, Event>) => void;
  closeLabel: string | undefined;
  titleId: string | undefined;
  setTitleId: (id: string) => void;
};
