import type { ComponentType, CSSProperties, ReactNode } from 'react'; import type { Subscription } from './events'; import type { KeyboardShortcut } from './shortcuts'; export type LayoutTypes = 'popover' | 'drawer' | 'dialog' | 'fullscreen' | 'toolbar' | 'base' | 'baseDialog'; export type Layout = LayoutTypes | { desktop: LayoutTypes; mobile: LayoutTypes; }; export type Placement = 'top-start' | 'top' | 'top-end' | 'right-start' | 'right' | 'right-end' | 'bottom-start' | 'bottom' | 'bottom-end' | 'left-start' | 'left' | 'left-end'; type ModalPositioning = { referenceElement?: any; placement?: Placement; }; export type ModalConfig = { Component: ComponentType; id: string; type?: 'exclusive'; shortcuts?: KeyboardShortcut[]; layout?: Layout; autoFocus?: boolean; disableArrowNavigation?: boolean; disableCloseOnEscape?: boolean; noPadding?: boolean; } & ({ enableDrag?: false; } | { enableDrag: true; dragHandleSelector: string; }); export type OpenModalConfig

> = { layout: Layout; componentProps?: P; positioning?: ModalPositioning; returnFocusOnDeactivate?: boolean; onClickOutside?: (event: MouseEvent | TouchEvent) => void; type?: 'exclusive'; noPadding?: boolean; entryType?: string; dropdownValue?: string; }; export type Modal = ModalConfig & OpenModalConfig; export interface ModalService { openModal:

(id: string, config: OpenModalConfig

) => boolean; isModalOpen: (id: string) => boolean; isExclusiveModalOpen: () => boolean; register: (modalConfig: ModalConfig) => void; unregister: (id: string) => void; closeModal: (id: string) => boolean; getOpenModals: () => Modal[]; onModalOpened: (onOpen: (id: string) => unknown) => Subscription; onModalClosed: (onClose: (id: string) => unknown) => Subscription; destroy: () => void; getModal: (id: string) => Partial | undefined; } export type ModalProps = { children: ReactNode; modalConfig: Modal; className?: string; closeModal: () => void; zIndex: CSSProperties['zIndex']; }; export {}; //# sourceMappingURL=modalTypes.d.ts.map