/**
* Toast Service
* Centralized toast notification service using svelte-french-toast
* Provides consistent toast notifications across the FlowDrop application
*/
import { type DefaultToastOptions } from 'svelte-5-french-toast';
/**
* Default toast options themed with FlowDrop design tokens.
* Use with
* and import '@flowdrop/flowdrop/styles/toast.css' (or app toast.css) so toast bar styles apply.
*/
export declare const flowdropToastOptions: DefaultToastOptions;
/** Container class for FlowDrop-themed Toaster (used with toast.css). */
export declare const FLOWDROP_TOASTER_CLASS = "flowdrop-toaster";
/**
* Toast notification types
*/
export type ToastType = 'success' | 'error' | 'warning' | 'info' | 'loading';
/**
* Toast configuration options
*/
export interface ToastOptions {
duration?: number;
position?: 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
}
/**
* Show a success toast notification
*/
export declare function showSuccess(message: string, options?: ToastOptions): string;
/**
* Show an error toast notification
*/
export declare function showError(message: string, options?: ToastOptions): string;
/**
* Show a warning toast notification
*/
export declare function showWarning(message: string, options?: ToastOptions): string;
/**
* Show an info toast notification
*/
export declare function showInfo(message: string, options?: ToastOptions): string;
/**
* Show a loading toast notification
*/
export declare function showLoading(message: string, options?: ToastOptions): string;
/**
* Dismiss a specific toast by ID
*/
export declare function dismissToast(toastId: string): void;
/**
* Dismiss all toasts
*/
export declare function dismissAllToasts(): void;
/**
* Show a promise-based toast (loading -> success/error)
*/
export declare function showPromise(promise: Promise, { loading, success, error, options }: {
loading: string;
success: string | ((data: T) => string);
error: string | ((error: unknown) => string);
options?: ToastOptions;
}): Promise;
/**
* Show a confirmation toast (simplified version without action buttons)
*/
export declare function showConfirmation(message: string, options?: ToastOptions): string;
/**
* API-specific toast helpers
*/
export declare const apiToasts: {
/**
* Show API success message
*/
success: (operation: string, details?: string) => string;
/**
* Show API error message
*/
error: (operation: string, error: string | Error) => string;
/**
* Show API loading message
*/
loading: (operation: string) => string;
/**
* Show API promise with automatic success/error handling
*/
promise: (promise: Promise, operation: string, options?: {
successMessage?: string;
errorMessage?: string;
}) => Promise;
};
/**
* Workflow-specific toast helpers
*/
export declare const workflowToasts: {
/**
* Show workflow save success
*/
saved: (workflowName?: string) => string;
/**
* Show workflow save error
*/
saveError: (error: string | Error) => string;
/**
* Show workflow delete success
*/
deleted: (workflowName?: string) => string;
/**
* Show workflow delete error
*/
deleteError: (error: string | Error) => string;
/**
* Show workflow execution started
*/
executionStarted: (workflowName?: string) => string;
/**
* Show workflow execution completed
*/
executionCompleted: (workflowName?: string) => string;
/**
* Show workflow export success
*/
exported: (workflowName?: string) => string;
/**
* Show workflow execution error
*/
executionError: (error: string | Error) => string;
};
/**
* Pipeline-specific toast helpers
*/
export declare const pipelineToasts: {
/**
* Show pipeline creation success
*/
created: (pipelineName?: string) => string;
/**
* Show pipeline creation error
*/
creationError: (error: string | Error) => string;
/**
* Show pipeline execution started
*/
executionStarted: (pipelineId: string) => string;
/**
* Show pipeline execution completed
*/
executionCompleted: (pipelineId: string) => string;
/**
* Show pipeline execution error
*/
executionError: (pipelineId: string, error: string | Error) => string;
/**
* Show pipeline status update
*/
statusUpdate: (pipelineId: string, status: string) => string;
};