export const RELEASE_RING_IDS = [
    'stable',
    'preview',
    'publicdev',
    'internalpreview',
    'internaldev',
];
export const PUBLIC_RELEASE_RING_IDS = ['stable', 'preview', 'publicdev'];
const releaseRingCatalog = {
    stable: {
        id: 'stable',
        visibility: 'public',
        publicLabel: 'stable',
        sourceBranch: 'main',
        manifestChannel: 'stable',
        rollingReleaseSuffix: 'stable',
        embeddedPolicyEnv: 'production',
        expoAppEnv: 'production',
        expoUpdatesChannel: 'production',
        supportsMobileStoreSubmit: true,
    },
    preview: {
        id: 'preview',
        visibility: 'public',
        publicLabel: 'preview',
        sourceBranch: 'preview',
        manifestChannel: 'preview',
        rollingReleaseSuffix: 'preview',
        embeddedPolicyEnv: 'preview',
        expoAppEnv: 'preview',
        expoUpdatesChannel: 'preview',
        supportsMobileStoreSubmit: true,
    },
    publicdev: {
        id: 'publicdev',
        visibility: 'public',
        publicLabel: 'dev',
        sourceBranch: 'dev',
        manifestChannel: 'publicdev',
        rollingReleaseSuffix: 'dev',
        embeddedPolicyEnv: 'preview',
        expoAppEnv: 'preview',
        expoUpdatesChannel: 'dev',
        supportsMobileStoreSubmit: true,
    },
    internalpreview: {
        id: 'internalpreview',
        visibility: 'internal',
        publicLabel: 'preview',
        sourceBranch: 'dev',
        manifestChannel: null,
        rollingReleaseSuffix: null,
        embeddedPolicyEnv: 'preview',
        expoAppEnv: 'preview',
        expoUpdatesChannel: 'internalpreview',
        supportsMobileStoreSubmit: false,
    },
    internaldev: {
        id: 'internaldev',
        visibility: 'internal',
        publicLabel: 'dev',
        sourceBranch: 'dev',
        manifestChannel: null,
        rollingReleaseSuffix: null,
        embeddedPolicyEnv: '',
        expoAppEnv: 'development',
        expoUpdatesChannel: 'internaldev',
        supportsMobileStoreSubmit: false,
    },
};
export function getReleaseRingCatalogEntry(id) {
    const entry = releaseRingCatalog[id];
    if (!entry) {
        throw new Error(`Unknown release ring: ${String(id)}`);
    }
    return entry;
}
export function listReleaseRingCatalogEntries() {
    return RELEASE_RING_IDS.map((id) => releaseRingCatalog[id]);
}
export function isPublicReleaseRingId(id) {
    return getReleaseRingCatalogEntry(id).visibility === 'public';
}
export function getReleaseRingPublicLabel(id) {
    return getReleaseRingCatalogEntry(id).publicLabel;
}
const releaseRingAliases = {
    stable: 'stable',
    production: 'stable',
    prod: 'stable',
    preview: 'preview',
    publicdev: 'publicdev',
    'public-dev': 'publicdev',
    public_dev: 'publicdev',
    dev: 'publicdev',
    internalpreview: 'internalpreview',
    'internal-preview': 'internalpreview',
    internal_preview: 'internalpreview',
    canary: 'internalpreview',
    internaldev: 'internaldev',
    'internal-dev': 'internaldev',
    internal_dev: 'internaldev',
    development: 'internaldev',
};
export function normalizeReleaseRingId(raw) {
    const value = String(raw ?? '').trim().toLowerCase();
    if (!value)
        return '';
    return releaseRingAliases[value] ?? '';
}
export function listPublicReleaseRingCatalogEntries() {
    return listReleaseRingCatalogEntries().filter((entry) => entry.visibility === 'public');
}
export function listPublicReleaseRingLabels() {
    return PUBLIC_RELEASE_RING_IDS.map((id) => releaseRingCatalog[id].publicLabel);
}
export function normalizePublicReleaseRingId(raw) {
    const ringId = normalizeReleaseRingId(raw);
    if (!ringId || !isPublicReleaseRingId(ringId)) {
        return '';
    }
    return ringId;
}
//# sourceMappingURL=releaseRings.js.map