{"version":3,"file":"Modal.types.mjs","sourceRoot":"","sources":["../../../src/components/Modal/Modal.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ReactNode, RefObject } from 'react';\n\nimport type { FocusableElement } from '../ModalFocus/ModalFocus.types';\n\nexport type ModalProps = Omit<ComponentProps<'div'>, 'children'> & {\n  /**\n   * Whether the modal is open. When `false`, nothing is rendered (and the\n   * portal subtree is unmounted, releasing focus state).\n   */\n  isOpen: boolean;\n  /**\n   * Fired when the modal requests close — wire your state setter here.\n   * Triggered by the configured close-on-overlay-click and close-on-escape\n   * behaviors as well as any custom close affordances inside `children`.\n   */\n  onClose: () => void;\n  /**\n   * The modal subtree. Typically composed of `ModalOverlay` and\n   * `ModalContent` (which read shared behavior via `useModalContext`).\n   */\n  children: ReactNode;\n  /**\n   * Optional prop for additional CSS classes to be applied to the Modal root.\n   * Merged with the component's defaults via `twMerge`.\n   */\n  className?: string;\n  /**\n   * When `true`, clicking the overlay (outside the modal content) closes the\n   * modal.\n   *\n   * @default true\n   */\n  isClosedOnOutsideClick?: boolean;\n  /**\n   * When `true`, pressing Escape closes the modal. When `false`, ensure the\n   * modal exposes a visible/keyboard-reachable close affordance for\n   * keyboard-only users.\n   *\n   * @default true\n   */\n  isClosedOnEscapeKey?: boolean;\n  /**\n   * When `true`, the first focusable element within the modal subtree is\n   * focused on mount.\n   *\n   * @default true\n   */\n  autoFocus?: boolean;\n  /**\n   * The element to receive focus when the modal opens. Overrides `autoFocus`'s\n   * \"first focusable\" behavior.\n   */\n  initialFocusRef?: RefObject<FocusableElement | null>;\n  /**\n   * The element to receive focus when the modal closes/unmounts.\n   */\n  finalFocusRef?: RefObject<FocusableElement | null>;\n  /**\n   * When `true`, focus is restored to the element that opened the modal once\n   * the modal closes. Ignored when `finalFocusRef` is provided.\n   *\n   * @default false\n   */\n  restoreFocus?: boolean;\n};\n"]}