import { ActionSheetOptions, AlertOptions, LoadingOptions, ModalOptions, PopoverOptions, ToastOptions } from '@ionic/core'; import { JSX } from '@stencil/core'; /** * Show an action sheet. */ export declare const showActionSheet: (options: ActionSheetOptions) => Promise; /** * Show an alert. */ export declare const showAlert: (message?: string, options?: AlertOptions) => Promise; /** * Show a loading popover. */ export declare const showLoading: (options?: LoadingOptions) => Promise; /** * Show a loading popover while awaiting a promise. */ export declare const showLoadingWhile: (promise: Promise) => Promise; /** * Show a modal. * * Has to be a function because otherwise `keyof JSX.IntrinsicElements` gets expanded into a union type of string literals. * @see https://github.com/microsoft/TypeScript/issues/27171#issuecomment-533148919 */ export declare function showModal(options: TypedModalOptions): Promise; interface TypedModalOptions extends Omit { component: T; componentProps?: JSX.IntrinsicElements[T]; } /** * Show a toast. */ export declare const showToast: (message?: string, options?: ToastOptions) => Promise; /** * Show a popover. */ export declare const showPopover: (options: PopoverOptions) => Promise; /** * Show a progress bar at the top of the page (nprogress). */ export declare const showProgress: () => { done: () => void; }; /** * Show a progress bar while awaiting a promise. */ export declare const showProgressWhile: (promise: Promise) => Promise; /** * Show a confirmation alert that returns a promise which will resolve to `true` if the user presses "Yes" and `false` if the user presses "No". The message should be a question. */ export declare const showConfirmationAlert: (question?: string, options?: AlertOptions) => Promise; /** * Check whether the viewport is at least of specified size. * * The size breakpoints match the ones from Ionic (except 'xs' cause `0` is useless): * * | size | pixels | description | * |--------|---------|------------------| * | `'xs'` | 375 px | large phone | * | `'sm'` | 576 px | phablet | * | `'md'` | 768 px | tablet portrait | * | `'lg'` | 992 px | tablet landscape | * | `'xl'` | 1200 px | desktop | * * @see https://ionicframework.com/docs/layout/grid#default-breakpoints */ export declare const viewportIsMin: (size: keyof typeof breakpoints) => boolean; declare const breakpoints: { xs: number; sm: number; md: number; lg: number; xl: number; }; /** * Go to a route programmatically. */ export declare const goToRoute: typeof HTMLIonRouterElement.prototype.push; /** * Go back to the previous route in `window.history`. */ export declare const goToPreviousRoute: () => Promise; /** * Change the hash of the current route without adding a new state to the browser history. */ export declare const changeRouteHash: (hash: string) => void; export {};