"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.2.0-rc1
 * Contact: hello@goauthentik.io
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.LoginChallengeTypesFromJSON = LoginChallengeTypesFromJSON;
exports.LoginChallengeTypesFromJSONTyped = LoginChallengeTypesFromJSONTyped;
exports.LoginChallengeTypesToJSON = LoginChallengeTypesToJSON;
exports.LoginChallengeTypesToJSONTyped = LoginChallengeTypesToJSONTyped;
const AppleLoginChallenge_1 = require("./AppleLoginChallenge");
const PlexAuthenticationChallenge_1 = require("./PlexAuthenticationChallenge");
const RedirectChallenge_1 = require("./RedirectChallenge");
const TelegramLoginChallenge_1 = require("./TelegramLoginChallenge");
function LoginChallengeTypesFromJSON(json) {
    return LoginChallengeTypesFromJSONTyped(json, false);
}
function LoginChallengeTypesFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    switch (json['component']) {
        case 'ak-source-oauth-apple':
            return Object.assign({}, (0, AppleLoginChallenge_1.AppleLoginChallengeFromJSONTyped)(json, true), { component: 'ak-source-oauth-apple' });
        case 'ak-source-plex':
            return Object.assign({}, (0, PlexAuthenticationChallenge_1.PlexAuthenticationChallengeFromJSONTyped)(json, true), { component: 'ak-source-plex' });
        case 'ak-source-telegram':
            return Object.assign({}, (0, TelegramLoginChallenge_1.TelegramLoginChallengeFromJSONTyped)(json, true), { component: 'ak-source-telegram' });
        case 'xak-flow-redirect':
            return Object.assign({}, (0, RedirectChallenge_1.RedirectChallengeFromJSONTyped)(json, true), { component: 'xak-flow-redirect' });
        default:
            return json;
    }
}
function LoginChallengeTypesToJSON(json) {
    return LoginChallengeTypesToJSONTyped(json, false);
}
function LoginChallengeTypesToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    switch (value['component']) {
        case 'ak-source-oauth-apple':
            return Object.assign({}, (0, AppleLoginChallenge_1.AppleLoginChallengeToJSON)(value), { component: 'ak-source-oauth-apple' });
        case 'ak-source-plex':
            return Object.assign({}, (0, PlexAuthenticationChallenge_1.PlexAuthenticationChallengeToJSON)(value), { component: 'ak-source-plex' });
        case 'ak-source-telegram':
            return Object.assign({}, (0, TelegramLoginChallenge_1.TelegramLoginChallengeToJSON)(value), { component: 'ak-source-telegram' });
        case 'xak-flow-redirect':
            return Object.assign({}, (0, RedirectChallenge_1.RedirectChallengeToJSON)(value), { component: 'xak-flow-redirect' });
        default:
            return value;
    }
}
//# sourceMappingURL=LoginChallengeTypes.js.map