import type { Bud } from '@roots/bud-framework'; import type { Notification as NodeNotification, NotificationCallback } from '@roots/bud-support/node-notifier'; /** * Notification */ interface Notification extends NodeNotification { actions?: string | string[]; closeLabel?: string; contentImage?: string; dropdownLabel?: string; group?: string; open?: string | URL; reply?: boolean; sound?: boolean | string; subtitle?: string; timeout?: false | number; } /** * Notifier */ export declare class Notifier { _app: () => Bud; /** * Browser to open on error */ browser: boolean | string; /** * Track if browser has already been opened once * to prevent multiple browser tabs from opening * when changes are saved. * * When {@link Notifier.openBrowser} is called and this * prop is true the call exits early. Otherwise, the * browser is opened and this prop is set to true. * * @see {@link https://github.com/roots/bud/issues/2041} */ browserOpened: boolean; /** * Node-notifier notification center instance */ notificationCenter: { notify(notification?: Notification, callback?: NotificationCallback): Notifier[`notificationCenter`]; }; /** * Class constructor */ constructor(_app: () => Bud); /** * Get bud instance */ get app(): Bud; /** * Editor to open on error */ get editor(): boolean | string; /** * Make notifier */ make(bud: Bud): Promise; /** * True if notifications are enabled */ get notificationsEnabled(): boolean; /** * Emit OS notification center notice */ notify(notification: Notification, callback?: NotificationCallback): void; /** * Open browser in development */ openBrowser(url: string): Promise; /** * Open editor on error */ openEditor(input: Array | string): Promise; /** * If --editor flag is passed */ get openEditorEnabled(): boolean; } export {};