import type React from "react";
import type { AgentDetails, AgentMetadata } from "../../services/agentService";
import type { AiProfile } from "../../services/aiService";
import type { AgentSettingsMode } from "./useAgentSettingsData";
export type PendingAgentSettingsRef = React.MutableRefObject<{
    modelName?: string | null;
    mode?: AgentSettingsMode;
    profileId?: string | null;
    profileName?: string | null;
} | null>;
export declare function isLocalAgentDraft(agent: Pick<AgentDetails, "status" | "userId"> | undefined, agentStub: Pick<AgentDetails, "status" | "userId">): boolean;
export declare function usePendingAgentSettings(input: {
    activeProfile: AiProfile | undefined;
    agentId?: string;
    mode: AgentSettingsMode;
    profiles: AiProfile[];
    selectedModelId: string | undefined;
}): {
    pendingSettingsRef: React.RefObject<{
        modelName?: string | null;
        mode?: AgentSettingsMode;
        profileId?: string | null;
        profileName?: string | null;
    } | null>;
    persistPendingSettingsIfNeeded: () => Promise<void>;
    getPendingRequestSettings: () => {
        mode: AgentSettingsMode;
        profileId: string;
        profileName: string;
        modelId: string | undefined;
    };
};
/**
 * Applies profile-owned metadata to a fresh local draft. A draft has not run
 * yet, so its todo list belongs to the selected profile and must change with
 * it; retaining the default profile's metadata makes the selected profile and
 * the visible tray disagree until the first backend round trip.
 */
export declare function buildDraftMetadataForProfile(current: AgentMetadata | null | undefined, profile: AiProfile): AgentMetadata;
export declare function useAgentSettingsCommands(input: {
    activeProfile: AiProfile | undefined;
    agent: AgentDetails | undefined;
    agentMetadata: AgentMetadata | null;
    isLocalOnlyDraftAgent: boolean;
    pendingSettingsRef: PendingAgentSettingsRef;
    profiles: AiProfile[];
    readOnly: boolean;
    onAgentUpdate?: (updates: Partial<AgentDetails>) => void;
    onDraftMetadataUpdate?: (metadata: AgentMetadata) => void;
    setActiveProfile: React.Dispatch<React.SetStateAction<AiProfile | undefined>>;
    setAgent: (next: React.SetStateAction<AgentDetails | undefined>) => void;
    setAgentMetadata: (next: React.SetStateAction<AgentMetadata | null>) => void;
    setMode: React.Dispatch<React.SetStateAction<AgentSettingsMode>>;
    setSelectedModelId: React.Dispatch<React.SetStateAction<string | undefined>>;
}): {
    handleModeSettingsChange: (value: string) => Promise<void>;
    handleProfileSettingsChange: (profileId: string) => Promise<void>;
    handleModelSettingsChange: (modelId: string) => Promise<void>;
};
