import { type ReactNode } from 'react';
export interface AssistantUser {
    id: string;
    email?: string;
    firstname?: string;
    lastname?: string;
    photo?: string;
    /** Tenant roles (e.g. `'super_admin'`); gates approving agent consent. */
    roles?: string[];
}
export interface EnumOption {
    id: string;
    name: string;
    color?: string;
    icon?: string;
    parent?: string;
    slug?: string;
    sort_order?: number;
    active?: boolean;
    is_final_option?: boolean;
    force_description?: boolean;
    force_followup_date?: boolean;
    description?: string;
}
export interface DataSourceField {
    id: string;
    name: string;
    slug: string;
    type: string;
    read_only?: boolean;
    sort_order?: number;
    enumOptions?: EnumOption[];
    /** Inline enum data that may come directly from the field metadata */
    data?: EnumOption[];
    options?: Record<string, unknown>;
    /** Related data source ID for relation fields */
    relation_data_source_id?: string;
}
export interface DataSourceSchema {
    id: string;
    name: string;
    slug: string;
    app: {
        id: string;
        name: string;
        slug: string;
    };
    fields: DataSourceField[];
}
/** A prompt template surfaced in the chat input's template picker. */
export interface PromptTemplateInfo {
    id: string;
    title: string;
    /** Prompt body; `{{slug}}` placeholders are filled from the form values. */
    content?: string | null;
    /** Form-builder layout (`{ fields: [...] }`) or null. */
    promptFormSchema?: unknown;
}
export interface AssistantConfig {
    apiBaseUrl: string;
    getAuthToken: () => Promise<string>;
    user: AssistantUser;
    getDataSourceSchema?: (id: string) => Promise<DataSourceSchema | null>;
    /**
     * Endpoint (relative to `apiBaseUrl`) the chat surface calls to list an
     * agent's prompt templates. Either a string with a `:agentId` placeholder,
     * or a function of the agent id — the function form lets a host route e.g.
     * system agents to a different endpoint than tenant-owned ones.
     *
     * This is intentionally NOT the `/dev/...` studio route (admin-only,
     * tenant-filtered). When omitted the chat uses the end-user AI endpoint.
     *
     * @default '/ai/agents/:agentId/prompt-templates'
     */
    promptTemplatesEndpoint?: string | ((agentId: string) => string);
    /**
     * Optional render slot for a prompt template's input form. When provided and
     * the selected template has a form schema, the chat renders this in place of
     * the text input (e.g. the client renders it with `useDynamicFormView`).
     * Call `onSubmit(prompt)` with the composed prompt to send, `onCancel()` to
     * dismiss. When omitted, the chat falls back to its built-in form renderer.
     */
    renderPromptTemplateForm?: (args: {
        template: PromptTemplateInfo;
        onSubmit: (prompt: string) => void;
        onCancel: () => void;
    }) => ReactNode;
}
/** Default end-user endpoint for listing an agent's prompt templates. */
export declare const DEFAULT_PROMPT_TEMPLATES_ENDPOINT = "/ai/agents/:agentId/prompt-templates";
/**
 * Resolve the prompt-templates endpoint for an agent from the (optional)
 * `promptTemplatesEndpoint` config — string with `:agentId`, function, or the
 * default end-user route.
 */
export declare function resolvePromptTemplatesEndpoint(endpoint: AssistantConfig['promptTemplatesEndpoint'], agentId: string): string;
export interface AssistantProviderProps {
    config: AssistantConfig;
    children: ReactNode;
}
export declare function AssistantProvider({ config, children }: AssistantProviderProps): import("react/jsx-runtime").JSX.Element;
export declare function useAssistantConfig(): AssistantConfig;
