{"version":3,"file":"idpWebComponent.mjs","sources":["../../../src/b2b/idpWebComponent.tsx"],"sourcesContent":["import type { StytchProjectConfigurationInput } from '@stytch/core/public';\nimport { B2BIDPContainer, B2BIDPSDKConfig } from '@stytch/web/b2b';\n\nimport { createMountFn, createWebComponent } from '../bindings/WebComponents';\n\n/**\n * Renders a B2B IDP Consent screen.\n * Parses OAuth Authorization params (client_id, scope, nonce, etc.) out of the page URL.\n * Requires the user to be logged in.\n *\n * @attr {boolean} [shadow] - use shadow DOM to contain styles\n *\n * @prop {StytchB2BClient} client - used to make API calls.\n * @prop {PresentationConfig} [presentation] - for customizing the UI styling and presentation\n * @prop {Messages} [strings] - custom strings to be used in the prebuilt UI.\n * @prop {B2BIDPConsentManifestGenerator} [getIDPConsentManifest] - to customize the consent screen.\n * @prop {AuthTokenParams} [trustedAuthTokenParams] - trusted auth token params for attestation prior to running OAuth flow.\n *\n * @event StytchEvent - see {@link import('../../WebComponents').StytchEvent}\n * @event StytchError - see {@link import('../../WebComponents').StytchError}\n *\n */\nexport const StytchB2BIdentityProvider = createWebComponent<B2BIDPSDKConfig<StytchProjectConfigurationInput>>(\n  B2BIDPContainer,\n  {\n    propNames: ['client', 'presentation', 'callbacks', 'strings', 'getIDPConsentManifest', 'trustedAuthTokenParams'],\n  },\n);\n\n/**\n * Mounts a B2B IDP Consent screen inside the element provided.\n * Parses OAuth Authorization params (client_id, scope, nonce, etc.) out of the page URL.\n * Requires the user to be logged in.\n * @example\n * mountB2BIdentityProvider({\n *   client: stytchB2BClient,\n *   elementId: '#idp-container',\n * });\n *\n * @deprecated Prefer the StytchB2BIdentityProvider web component\n *\n * @param client - A {@link StytchB2BClient} instance used for making API calls.\n * @param elementId - A string containing the id of the element that should contain the consent screen.\n * @param presentation - Optional {@link PresentationConfig} object for customizing the UI presentation\n * @param callbacks - Optional {@link Callbacks} triggered by various events in the Stytch SDK.\n * @param getIDPConsentManifest - Optional {@link B2BIDPConsentManifestGenerator} to customize the consent screen.\n * @param trustedAuthTokenParams - Optional trusted auth token params for attestation prior to running OAuth flow.\n * @param strings - Optional custom strings to be used in the prebuilt UI.\n * @throws An error when the element specified by elementId cannot be found.\n */\nexport const mountIdentityProvider = createMountFn('stytch-identity-provider', StytchB2BIdentityProvider);\n"],"names":["StytchB2BIdentityProvider","createWebComponent","B2BIDPContainer","propNames","mountIdentityProvider","createMountFn"],"mappings":";;;AAKA;;;;;;;;;;;;;;;;AAgBC,IACM,MAAMA,yBAAAA,GAA4BC,kBAAAA,CACvCC,eAAAA,EACA;IACEC,SAAAA,EAAW;AAAC,QAAA,QAAA;AAAU,QAAA,cAAA;AAAgB,QAAA,WAAA;AAAa,QAAA,SAAA;AAAW,QAAA,uBAAA;AAAyB,QAAA;AAAyB;AAClH,CAAA;AAGF;;;;;;;;;;;;;;;;;;;;AAoBC,IACM,MAAMC,qBAAAA,GAAwBC,aAAAA,CAAc,4BAA4BL,yBAAAA;;;;"}