import { type ReactNode } from "react"; export type CopyState = "idle" | "copied" | "failed"; /** Copies text; falls back to a hidden textarea when the async clipboard is blocked. */ export declare function copyText(text: string): Promise; /** "9f1c2d4e-7a3b-…-0a1b2c3d4e5f" style: keeps the start and end, which people compare. */ export declare function truncateMiddle(value: string, maxLength?: number): string; /** Copy with a short-lived confirmation state. */ export declare function useCopyToClipboard({ resetAfter, copy, }?: { resetAfter?: number; copy?: (text: string) => Promise; }): { state: CopyState; copy: (text: string) => Promise; }; export declare function CopyField({ value, display, label, variant, size, truncate, maxLength, wrap, disabled, placeholder, onCopied, copy, previewState, className, }: { /** The exact text that gets copied. */ value: string; /** What to show instead of the value, for example a prefix "ogk_d591f5ad…". */ display?: ReactNode | undefined; /** What the value is, for the button's accessible name: "workspace ID". */ label: string; variant?: "inline" | "field" | undefined; /** Inline only: "sm" for rows and meta (24px button), "md" for settings rows. */ size?: "sm" | "md" | undefined; /** * Inline only: "middle" keeps the start and the end when space runs out * (IDs, tokens); the full value shows whenever it fits. */ truncate?: "none" | "middle" | undefined; /** Inline, middle only: never show more than this many characters. */ maxLength?: number | undefined; /** Field only: show the whole value across lines instead of scrolling. */ wrap?: boolean | undefined; disabled?: boolean | undefined; /** Field only: shown when there is no value yet, for example "Created when you save". */ placeholder?: string | undefined; onCopied?: (() => void) | undefined; /** Injectable clipboard, for tests. */ copy?: ((text: string) => Promise) | undefined; /** Forces a state, for documentation previews only. */ previewState?: CopyState | undefined; className?: string | undefined; }): import("react").JSX.Element;