import type { SKYKOIConfig } from "../../config/config.js";
import type { DmPolicy } from "../../config/types.js";
import type { RuntimeEnv } from "../../runtime.js";
import type { WizardPrompter } from "../../wizard/prompts.js";
import type { ChannelId } from "./types.js";
export type SetupChannelsOptions = {
    allowDisable?: boolean;
    allowSignalInstall?: boolean;
    onSelection?: (selection: ChannelId[]) => void;
    accountIds?: Partial<Record<ChannelId, string>>;
    onAccountId?: (channel: ChannelId, accountId: string) => void;
    promptAccountIds?: boolean;
    whatsappAccountId?: string;
    promptWhatsAppAccountId?: boolean;
    onWhatsAppAccountId?: (accountId: string) => void;
    forceAllowFromChannels?: ChannelId[];
    skipStatusNote?: boolean;
    skipDmPolicyPrompt?: boolean;
    skipConfirm?: boolean;
    quickstartDefaults?: boolean;
    initialSelection?: ChannelId[];
};
export type PromptAccountIdParams = {
    cfg: SKYKOIConfig;
    prompter: WizardPrompter;
    label: string;
    currentId?: string;
    listAccountIds: (cfg: SKYKOIConfig) => string[];
    defaultAccountId: string;
};
export type PromptAccountId = (params: PromptAccountIdParams) => Promise<string>;
export type ChannelOnboardingStatus = {
    channel: ChannelId;
    configured: boolean;
    statusLines: string[];
    selectionHint?: string;
    quickstartScore?: number;
};
export type ChannelOnboardingStatusContext = {
    cfg: SKYKOIConfig;
    options?: SetupChannelsOptions;
    accountOverrides: Partial<Record<ChannelId, string>>;
};
export type ChannelOnboardingConfigureContext = {
    cfg: SKYKOIConfig;
    runtime: RuntimeEnv;
    prompter: WizardPrompter;
    options?: SetupChannelsOptions;
    accountOverrides: Partial<Record<ChannelId, string>>;
    shouldPromptAccountIds: boolean;
    forceAllowFrom: boolean;
};
export type ChannelOnboardingResult = {
    cfg: SKYKOIConfig;
    accountId?: string;
};
export type ChannelOnboardingDmPolicy = {
    label: string;
    channel: ChannelId;
    policyKey: string;
    allowFromKey: string;
    getCurrent: (cfg: SKYKOIConfig) => DmPolicy;
    setPolicy: (cfg: SKYKOIConfig, policy: DmPolicy) => SKYKOIConfig;
    promptAllowFrom?: (params: {
        cfg: SKYKOIConfig;
        prompter: WizardPrompter;
        accountId?: string;
    }) => Promise<SKYKOIConfig>;
};
export type ChannelOnboardingAdapter = {
    channel: ChannelId;
    getStatus: (ctx: ChannelOnboardingStatusContext) => Promise<ChannelOnboardingStatus>;
    configure: (ctx: ChannelOnboardingConfigureContext) => Promise<ChannelOnboardingResult>;
    dmPolicy?: ChannelOnboardingDmPolicy;
    onAccountRecorded?: (accountId: string, options?: SetupChannelsOptions) => void;
    disable?: (cfg: SKYKOIConfig) => SKYKOIConfig;
};
