"use strict";
/**
 * Official Channels IDs (leaf module, no runtime dependencies)
 *
 * Pure helpers extracted from `official-channels-runtime` so that
 * config-loader code can use them without transitively pulling in
 * `claude-detector` / `shell-executor` / `websearch-manager`.
 *
 * The full channel definitions (with display names, plugin specs, env keys,
 * etc.) live in `official-channels-runtime`. This module only owns:
 * - the canonical ordered list of channel IDs
 * - the type-narrowing predicate
 * - the order-preserving normalizer
 * - the legacy-discord shim
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolveLegacyDiscordSelection = exports.normalizeOfficialChannelIds = exports.isOfficialChannelId = exports.OFFICIAL_CHANNEL_IDS = void 0;
/** Canonical, ordered list of official channel IDs. */
exports.OFFICIAL_CHANNEL_IDS = [
    'telegram',
    'discord',
    'imessage',
];
const OFFICIAL_CHANNEL_ID_SET = new Set(exports.OFFICIAL_CHANNEL_IDS);
function isOfficialChannelId(value) {
    return OFFICIAL_CHANNEL_ID_SET.has(value);
}
exports.isOfficialChannelId = isOfficialChannelId;
function normalizeOfficialChannelIds(values) {
    const seen = new Set();
    const normalized = [];
    for (const channelId of exports.OFFICIAL_CHANNEL_IDS) {
        if (!values.includes(channelId) || seen.has(channelId)) {
            continue;
        }
        seen.add(channelId);
        normalized.push(channelId);
    }
    return normalized;
}
exports.normalizeOfficialChannelIds = normalizeOfficialChannelIds;
function resolveLegacyDiscordSelection(enabled) {
    return enabled ? ['discord'] : [];
}
exports.resolveLegacyDiscordSelection = resolveLegacyDiscordSelection;
//# sourceMappingURL=official-channels-ids.js.map