import { ReactNode } from 'react';
import { FetchState } from '@zeniai/client-epic-state';
export interface DialogField {
    inputType: "text" | "password";
    label: string;
    /** Form field key — also the request-body key sent to the BE
     *  (e.g. "api_key", "site", "client_id", "client_secret"). */
    name: string;
    placeholder: string;
    /** Only one field per dialog should be `autoFocus: true`. */
    autoFocus?: boolean;
    /** Helper text shown directly below the input. Pass JSX to render
     *  computed fragments (e.g. ChargeBee's "<site>.chargebee.com" preview). */
    hint?: (value: string) => ReactNode;
}
export interface ApiKeyDialogConfig {
    description: ReactNode;
    fields: DialogField[];
    title: string;
    /** Optional callout below the fields. Used for the
     *  "we recommend a read-only key" pattern. */
    recommendation?: ReactNode;
}
export interface ApiKeyDialogProps {
    config: ApiKeyDialogConfig;
    isOpen: boolean;
    isSaving: FetchState;
    error?: string;
    onClose: () => void;
    /** Returns ``{ <field.name>: trimmed value }`` for every field in
     *  ``config.fields``. The host wires this directly to the CES
     *  ``saveConnectorCredentials`` action (or the legacy
     *  ``saveAPIKeyConnection`` for ChargeBee). */
    onConnect: (credentials: Record<string, string>) => void;
}
declare const ApiKeyDialog: ({ isOpen, isSaving, config, error, onConnect, onClose, }: ApiKeyDialogProps) => import("react/jsx-runtime").JSX.Element;
export default ApiKeyDialog;
