import { B2BOAuthProviders } from '../../../core/src/public/b2b/ui.mjs';

const getParamsFromB2BOAuthProviderConfig = (provider)=>{
    let providerType;
    let oneTap = false;
    let customScopes = [];
    let providerParams = {};
    let cancelOnTapOutside = undefined;
    if (typeof provider === 'string') {
        providerType = provider;
    } else {
        providerType = provider.type;
        if (provider.type === B2BOAuthProviders.Google && provider.one_tap) {
            oneTap = provider.one_tap;
            cancelOnTapOutside = provider.cancel_on_tap_outside;
        }
        customScopes = provider.customScopes || [];
        providerParams = provider.providerParams || {};
    }
    return {
        type: providerType,
        one_tap: oneTap,
        customScopes,
        providerParams,
        cancel_on_tap_outside: cancelOnTapOutside
    };
};

export { getParamsFromB2BOAuthProviderConfig };
//# sourceMappingURL=oauthProviderType.mjs.map
