import { ModalController } from '@ionic/angular/standalone'; import { ModalMetadata, SimpleModalMetadata, ModalResult, ModalButton } from './types'; import * as i0 from "@angular/core"; /** * ModalService * * A service for creating and managing modals with various configurations. * * @example Basic component modal * ```typescript * const result = await modalService.open({ * component: MyFormComponent, * componentProps: { userId: 123 }, * header: { title: 'Edit User', showCloseButton: true }, * size: 'medium' * }); * * if (result.role === 'confirm') { * console.log('Saved:', result.data); * } * ``` * * @example Simple content modal * ```typescript * await modalService.openSimple({ * title: 'Terms of Service', * content: '

Terms content here...

', * size: 'large', * showCloseButton: true * }); * ``` * * @example Sheet modal (mobile) * ```typescript * const result = await modalService.openSheet({ * component: FilterComponent, * breakpoints: { * initialBreakpoint: 0.5, * breakpoints: [0, 0.5, 1], * showHandle: true * } * }); * ``` */ export declare class ModalService { private modalController; constructor(modalController: ModalController); /** * Opens a modal with a component. * @param options - Modal configuration * @returns Promise resolving to the modal result */ open(options: ModalMetadata): Promise>; /** * Opens a simple content modal without a custom component. * Uses Ionic's alert-like styling but with modal capabilities. * @param options - Simple modal configuration * @returns Promise resolving to the modal result */ openSimple(options: SimpleModalMetadata): Promise; /** * Opens a confirmation modal. * @param title - Modal title * @param message - Modal message * @param confirmButton - Confirm button config (optional) * @param cancelButton - Cancel button config (optional) * @returns Promise resolving to true if confirmed */ confirm(title: string, message: string, confirmButton?: Partial, cancelButton?: Partial): Promise; /** * Opens a sheet modal (iOS-style bottom sheet). * @param options - Modal configuration with sheet-specific options * @returns Promise resolving to the modal result */ openSheet(options: Omit, 'breakpoints'> & { initialBreakpoint?: number; breakpoints?: number[]; showHandle?: boolean; }): Promise>; /** * Opens a fullscreen modal. * @param options - Modal configuration * @returns Promise resolving to the modal result */ openFullscreen(options: ModalMetadata): Promise>; /** * Opens an adaptive modal: full-screen on mobile, centered card on desktop. * * Solves two sheet-modal problems at once: * 1. Content unreachable — no artificial height cap from breakpoints. * 2. Scroll triggers dismiss — no swipe gesture, only backdrop/button close. * * @param options - Modal configuration (breakpoints/size/width/height are managed internally) * @param variant - 'wide' for wider desktop card (720px vs default 560px) */ openAdaptive(options: Omit, 'breakpoints' | 'size' | 'width' | 'height'>, variant?: 'wide'): Promise>; /** * Dismisses the top-most modal. * @param data - Optional data to return * @param role - Optional role */ dismiss(data?: any, role?: string): Promise; /** * Gets the top-most modal. */ getTop(): Promise; private normalizeCanDismiss; private buildCssClasses; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }