export const surfaceConfigDefaults = {
    slack: {
        enabled: false,
        signingSecret: '',
        botToken: '',
        appToken: '',
        defaultChannel: '',
        workspaceId: '',
        setupVersion: 0,
    },
    discord: {
        enabled: false,
        publicKey: '',
        botToken: '',
        applicationId: '',
        defaultChannelId: '',
        guildId: '',
        setupVersion: 0,
    },
    ntfy: {
        enabled: false,
        baseUrl: 'https://ntfy.sh',
        topic: '',
        token: '',
        defaultPriority: 3,
        setupVersion: 0,
    },
    webhook: {
        enabled: false,
        defaultTarget: '',
        timeoutMs: 10_000,
        secret: '',
        setupVersion: 0,
    },
    telegram: {
        enabled: false,
        botToken: '',
        webhookSecret: '',
        defaultChatId: '',
        botUsername: '',
        mode: 'webhook',
        setupVersion: 0,
    },
    googleChat: {
        enabled: false,
        webhookUrl: '',
        verificationToken: '',
        appId: '',
        spaceId: '',
        setupVersion: 0,
    },
    signal: {
        enabled: false,
        bridgeUrl: '',
        account: '',
        token: '',
        defaultRecipient: '',
        setupVersion: 0,
    },
    whatsapp: {
        enabled: false,
        provider: 'meta-cloud',
        accessToken: '',
        verifyToken: '',
        signingSecret: '',
        phoneNumberId: '',
        businessAccountId: '',
        defaultRecipient: '',
        setupVersion: 0,
    },
    imessage: {
        enabled: false,
        bridgeUrl: '',
        account: '',
        token: '',
        defaultChatId: '',
        setupVersion: 0,
    },
    msteams: {
        enabled: false,
        appId: '',
        appPassword: '',
        tenantId: '',
        serviceUrl: '',
        botId: '',
        defaultConversationId: '',
        defaultChannelId: '',
        setupVersion: 0,
    },
    bluebubbles: {
        enabled: false,
        serverUrl: '',
        password: '',
        account: '',
        defaultChatGuid: '',
        setupVersion: 0,
    },
    mattermost: {
        enabled: false,
        baseUrl: '',
        botToken: '',
        teamId: '',
        defaultChannelId: '',
        setupVersion: 0,
    },
    matrix: {
        enabled: false,
        homeserverUrl: '',
        accessToken: '',
        userId: '',
        defaultRoomId: '',
        setupVersion: 0,
    },
};
export const surfaceConfigSettings = [
    {
        key: 'surfaces.slack.enabled',
        type: 'boolean',
        default: false,
        description: 'Enable the Slack surface adapter',
    },
    {
        key: 'surfaces.slack.signingSecret',
        type: 'string',
        default: '',
        description: 'Slack signing secret used to verify inbound requests',
    },
    {
        key: 'surfaces.slack.botToken',
        type: 'string',
        default: '',
        description: 'Slack bot token used for outbound replies and thread updates',
    },
    {
        key: 'surfaces.slack.appToken',
        type: 'string',
        default: '',
        description: 'Slack app-level token used for advanced client flows',
    },
    {
        key: 'surfaces.slack.defaultChannel',
        type: 'string',
        default: '',
        description: 'Default Slack channel for notifications and replies',
    },
    {
        key: 'surfaces.slack.workspaceId',
        type: 'string',
        default: '',
        description: 'Slack workspace identifier for route binding',
    },
    {
        key: 'surfaces.discord.enabled',
        type: 'boolean',
        default: false,
        description: 'Enable the Discord surface adapter',
    },
    {
        key: 'surfaces.discord.publicKey',
        type: 'string',
        default: '',
        description: 'Discord application public key used to verify interactions',
    },
    {
        key: 'surfaces.discord.botToken',
        type: 'string',
        default: '',
        description: 'Discord bot token used for outbound replies',
    },
    {
        key: 'surfaces.discord.applicationId',
        type: 'string',
        default: '',
        description: 'Discord application ID used for interaction responses',
    },
    {
        key: 'surfaces.discord.defaultChannelId',
        type: 'string',
        default: '',
        description: 'Default Discord channel for notifications and replies',
    },
    {
        key: 'surfaces.discord.guildId',
        type: 'string',
        default: '',
        description: 'Discord guild identifier for route binding',
    },
    {
        key: 'surfaces.ntfy.enabled',
        type: 'boolean',
        default: false,
        description: 'Enable the ntfy notification surface',
    },
    {
        key: 'surfaces.ntfy.baseUrl',
        type: 'string',
        default: 'https://ntfy.sh',
        description: 'Base URL for ntfy delivery',
    },
    {
        key: 'surfaces.ntfy.topic',
        type: 'string',
        default: '',
        description: 'Default ntfy topic for notifications',
    },
    {
        key: 'surfaces.ntfy.token',
        type: 'string',
        default: '',
        description: 'ntfy access token used for authenticated delivery',
    },
    {
        key: 'surfaces.ntfy.defaultPriority',
        type: 'number',
        default: 3,
        description: 'Default ntfy priority (1-5)',
        validate: (v) => typeof v === 'number' && Number.isInteger(v) && v >= 1 && v <= 5,
    },
    {
        key: 'surfaces.webhook.enabled',
        type: 'boolean',
        default: false,
        description: 'Enable the generic webhook surface',
    },
    {
        key: 'surfaces.webhook.defaultTarget',
        type: 'string',
        default: '',
        description: 'Default outbound webhook target URL',
    },
    {
        key: 'surfaces.webhook.timeoutMs',
        type: 'number',
        default: 10_000,
        description: 'Outbound webhook timeout in milliseconds',
        validate: (v) => typeof v === 'number' && Number.isInteger(v) && v >= 1_000 && v <= 60_000,
    },
    {
        key: 'surfaces.webhook.secret',
        type: 'string',
        default: '',
        description: 'Shared secret used to sign or verify webhook payloads',
    },
    {
        key: 'surfaces.telegram.enabled',
        type: 'boolean',
        default: false,
        description: 'Enable the Telegram surface contract',
    },
    {
        key: 'surfaces.telegram.botToken',
        type: 'string',
        default: '',
        description: 'Telegram bot token used for bot setup and delivery',
    },
    {
        key: 'surfaces.telegram.webhookSecret',
        type: 'string',
        default: '',
        description: 'Telegram webhook secret token used to verify inbound callbacks',
    },
    {
        key: 'surfaces.telegram.defaultChatId',
        type: 'string',
        default: '',
        description: 'Default Telegram chat, group, or channel id for delivery',
    },
    {
        key: 'surfaces.telegram.botUsername',
        type: 'string',
        default: '',
        description: 'Telegram bot username used for targeting and setup hints',
    },
    {
        key: 'surfaces.telegram.mode',
        type: 'enum',
        default: 'webhook',
        description: 'Telegram ingress mode: webhook or polling',
        enumValues: ['webhook', 'polling'],
    },
    {
        key: 'surfaces.googleChat.enabled',
        type: 'boolean',
        default: false,
        description: 'Enable the Google Chat surface contract',
    },
    {
        key: 'surfaces.googleChat.webhookUrl',
        type: 'string',
        default: '',
        description: 'Google Chat outbound webhook or app callback URL',
    },
    {
        key: 'surfaces.googleChat.verificationToken',
        type: 'string',
        default: '',
        description: 'Google Chat verification token or shared secret',
    },
    {
        key: 'surfaces.googleChat.appId',
        type: 'string',
        default: '',
        description: 'Google Chat app identifier used for setup and diagnostics',
    },
    {
        key: 'surfaces.googleChat.spaceId',
        type: 'string',
        default: '',
        description: 'Default Google Chat space identifier for routing',
    },
    {
        key: 'surfaces.signal.enabled',
        type: 'boolean',
        default: false,
        description: 'Enable the Signal bridge surface contract',
    },
    {
        key: 'surfaces.signal.bridgeUrl',
        type: 'string',
        default: '',
        description: 'Signal bridge base URL used for health checks and delivery',
    },
    {
        key: 'surfaces.signal.account',
        type: 'string',
        default: '',
        description: 'Signal account or device identifier paired with the bridge',
    },
    {
        key: 'surfaces.signal.token',
        type: 'string',
        default: '',
        description: 'Signal bridge access token',
    },
    {
        key: 'surfaces.signal.defaultRecipient',
        type: 'string',
        default: '',
        description: 'Default Signal recipient or group identifier for routing',
    },
    {
        key: 'surfaces.whatsapp.enabled',
        type: 'boolean',
        default: false,
        description: 'Enable the WhatsApp surface contract',
    },
    {
        key: 'surfaces.whatsapp.provider',
        type: 'enum',
        default: 'meta-cloud',
        description: 'WhatsApp provider mode: Meta Cloud API or bridge',
        enumValues: ['meta-cloud', 'bridge'],
    },
    {
        key: 'surfaces.whatsapp.accessToken',
        type: 'string',
        default: '',
        description: 'WhatsApp provider access token',
    },
    {
        key: 'surfaces.whatsapp.verifyToken',
        type: 'string',
        default: '',
        description: 'WhatsApp webhook verify token or shared secret',
    },
    {
        key: 'surfaces.whatsapp.signingSecret',
        type: 'string',
        default: '',
        description: 'WhatsApp inbound signing secret or bridge bearer token',
    },
    {
        key: 'surfaces.whatsapp.phoneNumberId',
        type: 'string',
        default: '',
        description: 'WhatsApp phone number id used for provider setup',
    },
    {
        key: 'surfaces.whatsapp.businessAccountId',
        type: 'string',
        default: '',
        description: 'WhatsApp business account id used for provider setup',
    },
    {
        key: 'surfaces.whatsapp.defaultRecipient',
        type: 'string',
        default: '',
        description: 'Default WhatsApp recipient or chat id for routing',
    },
    {
        key: 'surfaces.imessage.enabled',
        type: 'boolean',
        default: false,
        description: 'Enable the iMessage bridge surface contract',
    },
    {
        key: 'surfaces.imessage.bridgeUrl',
        type: 'string',
        default: '',
        description: 'iMessage bridge base URL used for health checks and delivery',
    },
    {
        key: 'surfaces.imessage.account',
        type: 'string',
        default: '',
        description: 'iMessage account identifier used by the bridge',
    },
    {
        key: 'surfaces.imessage.token',
        type: 'string',
        default: '',
        description: 'iMessage bridge access token',
    },
    {
        key: 'surfaces.imessage.defaultChatId',
        type: 'string',
        default: '',
        description: 'Default iMessage chat id for routing',
    },
];
