import type { FunctionReference } from 'convex/server'; /** * Props for the ErrorBugReportButton component */ export interface ErrorBugReportButtonProps { /** The error to report */ error: Error; /** Reporter type: 'staff' for internal users, 'customer' for external users */ reporterType?: 'staff' | 'customer'; /** Unique identifier for the reporter (defaults to 'error-page') */ reporterId?: string; /** Reporter's email address (defaults to 'unknown@example.com') */ reporterEmail?: string; /** Reporter's display name (defaults to 'Error Page Reporter') */ reporterName?: string; /** Convex API reference for bug reports */ bugReportApi: { create: FunctionReference<'mutation'>; }; /** Button variant (default: 'outline') */ variant?: 'filled' | 'outline' | 'light' | 'subtle'; /** Button color (default: 'red') */ color?: string; /** Callback when submission succeeds */ onSuccess?: () => void; /** Callback when submission fails */ onError?: (error: Error) => void; } /** * A self-contained bug report button designed for error pages. * Pre-fills the error details and allows users to submit bug reports * directly from error pages. * * @example * ```tsx * import { ErrorBugReportButton } from '@fatagnus/convex-feedback/react'; * import { api } from './convex/_generated/api'; * * function ErrorPage({ error }: { error: Error }) { * return ( *
*

Something went wrong

* *
* ); * } * ``` */ export declare function ErrorBugReportButton({ error, reporterType, reporterId, reporterEmail, reporterName, bugReportApi, variant, color, onSuccess, onError, }: ErrorBugReportButtonProps): import("react/jsx-runtime").JSX.Element; export default ErrorBugReportButton; //# sourceMappingURL=ErrorBugReportButton.d.ts.map