/** Write `text` to the clipboard. `false` when the browser refused or has no clipboard API. */ export declare function copyText(text: string): Promise; export type CopyState = "idle" | "copied" | "failed"; export interface CopyOptions { /** How long `"copied"` shows. Default 2000 ms. */ copiedMs?: number; /** How long `"failed"` shows. Default 6000 ms: a failure is a sentence the reader has to act on. */ failedMs?: number; } /** * A copy with an outcome the reader can see. You choose what it says, such as "Copied" or "Select * it and copy it yourself", in a label or a toast. You also choose how to announce it: a label that * changes needs `aria-live="polite"` to be heard. * * The outcome goes back to `"idle"` on its own. A "Copied" that never clears makes the second copy * look like it did not take. */ export declare function useCopy({ copiedMs, failedMs }?: CopyOptions): { state: CopyState; /** Resolves `false` instead of throwing, so a caller can toast without a `catch`. */ copy: (text: string) => Promise; }; //# sourceMappingURL=copy.d.ts.map