import { oidcIdpMap, samlIdpMap } from './IdpInfo.mjs';

const makeSamlOption = (idpName)=>({
        idp: samlIdpMap[idpName],
        idpName,
        type: 'saml'
    });
const makeOidcOption = (idpName)=>({
        idp: oidcIdpMap[idpName],
        idpName,
        type: 'oidc'
    });
const idpOptions = {
    'saml:google-workspace': makeSamlOption('google-workspace'),
    'saml:okta': makeSamlOption('okta'),
    'oidc:okta': makeOidcOption('okta'),
    'saml:microsoft-entra': makeSamlOption('microsoft-entra'),
    'oidc:microsoft-entra': makeOidcOption('microsoft-entra'),
    'saml:generic': makeSamlOption('generic'),
    'oidc:generic': makeOidcOption('generic')
};
const idpSelectItems = Object.entries(idpOptions).map(([idpKey, { idp }])=>({
        label: idp.displayName,
        value: idpKey
    }));
const samlIdpSelectItems = Object.values(idpOptions).filter((item)=>item.type === 'saml').map((item)=>({
        label: item.idp.displayName,
        value: item.idpName
    }));
const oidcIdpSelectItems = Object.values(idpOptions).filter((item)=>item.type === 'oidc').map((item)=>({
        label: item.idp.displayName,
        value: item.idpName
    }));

export { idpOptions, idpSelectItems, oidcIdpSelectItems, samlIdpSelectItems };
//# sourceMappingURL=IdpSelect.mjs.map
