import { Clipboard } from '@angular/cdk/clipboard';
import { type GetterOrValueWithInput, type Maybe, type Milliseconds, type Seconds } from '@dereekb/util';
/**
 * True if copying to the clipboard was successful.
 */
export type CopyToClipboardSuccess = boolean;
/**
 * Can only copy strings to the clipboard.
 */
export type CopyToClipboardContent = string;
/**
 * Copies the input text to the clipboard.
 *
 * @param content The content to copy.
 * @returns A promise that resolves to true if the content was copied successfully, false otherwise.
 */
export type CopyToClipboardFunction = ((content: CopyToClipboardContent) => Promise<CopyToClipboardSuccess>) & {
    readonly _clipboard: Clipboard;
};
export interface CopyToClipboardFunctionConfig {
    readonly copyTimeoutSeconds?: Maybe<Seconds>;
    readonly delayBetweenCopyAttempts?: Maybe<Milliseconds>;
    readonly onCopyResult?: Maybe<(success: CopyToClipboardSuccess, content: CopyToClipboardContent) => void>;
}
/**
 * Creates a copy to clipboard function.
 *
 * @param clipboard The clipboard to use.
 * @param config Optional configuration.
 * @returns The copy to clipboard function.
 */
export declare function copyToClipboardFunction(clipboard: Clipboard, config?: CopyToClipboardFunctionConfig): CopyToClipboardFunction;
/**
 * Injects a copy to clipboard function.
 *
 * Must be run in an Angular injection context.
 *
 * @param config
 * @returns
 */
export declare function injectCopyToClipboardFunction(config?: CopyToClipboardFunctionConfig): CopyToClipboardFunction;
/**
 * Copies the input text to the clipboard.
 *
 * @param content The content to copy.
 * @returns A promise that resolves to true if the content was copied successfully, false otherwise.
 */
export type CopyToClipboardFunctionWithSnackbarMessage = CopyToClipboardFunction & {
    setSnackbarMessagesConfig(config: Maybe<CopyToClipboardFunctionWithSnackbarMessageSnackbarConfig>): void;
    setSnackbarMessagesEnabled(enabled: boolean): void;
};
export interface CopyToClipboardFunctionWithSnackbarMessageSnackbarConfig {
    /**
     * The duration to show the snackbar for.
     *
     * Defaults to 3 seconds.
     */
    readonly snackbarDuration?: Milliseconds;
    /**
     * The message to show when the content is copied successfully.
     */
    readonly successMessage?: GetterOrValueWithInput<string, CopyToClipboardContent>;
    /**
     * The message to show when the content fails to copy.
     */
    readonly failureMessage?: GetterOrValueWithInput<string, CopyToClipboardContent>;
}
export interface CopyToClipboardFunctionWithSnackbarMessageConfig extends CopyToClipboardFunctionConfig, CopyToClipboardFunctionWithSnackbarMessageSnackbarConfig {
}
/**
 * Injects a copy to clipboard function.
 *
 * Must be run in an Angular injection context.
 *
 * @param config
 * @returns
 */
export declare function injectCopyToClipboardFunctionWithSnackbarMessage(config?: CopyToClipboardFunctionWithSnackbarMessageConfig): CopyToClipboardFunctionWithSnackbarMessage;
