export const NOTIFICATIONS = {
    id: "notifications",
    dev: "https://notifications.cloud.dev.ultrawombat.com",
    int: "https://notifications.cloud.ultrawombat.com",
    prod: "https://notifications.cloud.camunda.io",
};
export const ACCOUNTS = {
    id: "accounts",
    dev: "https://accounts.cloud.dev.ultrawombat.com",
    int: "https://accounts.cloud.ultrawombat.com",
    prod: "https://accounts.cloud.camunda.io",
};
export function getEndpoint(stage, endpoint) {
    switch (stage) {
        case "dev":
            return endpoint.dev;
        case "int":
            return endpoint.int;
        case "prod":
            return endpoint.prod;
        default:
            throw new Error(`Unknown stage: ${stage}`);
    }
}
export function getEndpointByOptions(options) {
    switch (options.endpoint.id) {
        case "notifications":
            if (options.endpoints?.notifications) {
                return options.endpoints.notifications;
            }
            else if (options.stage) {
                return getEndpoint(options.stage, options.endpoint);
            }
            break;
        case "accounts":
            if (options.endpoints?.accounts) {
                return options.endpoints.accounts;
            }
            else if (options.stage) {
                return getEndpoint(options.stage, options.endpoint);
            }
    }
    throw new Error(`Missing stage or notifications endpoint`);
}
