{"version":3,"file":"loginWebComponent.mjs","sources":["../../../src/b2b/loginWebComponent.tsx"],"sourcesContent":["import type { StytchProjectConfigurationInput } from '@stytch/core/public';\nimport { AppContainer, B2BSDKConfig } from '@stytch/web/b2b';\n\nimport { createMountFn, createWebComponent } from '../bindings/WebComponents';\n\n/**\n * Renders a B2B log in screen.\n *\n * @attr {boolean} [shadow] - use shadow DOM to contain styles\n *\n * @prop {StytchB2BClient} client - used to make API calls.\n * @prop {StytchB2BUIConfig} config - object containing the products that should be registered\n * @prop {PresentationConfig} [presentation] - for customizing the UI styling and presentation\n * @prop {Messages} [strings] - custom strings to be used, to customize text or for localization\n *\n * @event StytchEvent - see {@link import('../../WebComponents').StytchEvent}\n * @event StytchError - see {@link import('../../WebComponents').StytchError}\n *\n */\nexport const StytchB2B = createWebComponent<B2BSDKConfig<StytchProjectConfigurationInput>>(AppContainer, {\n  propNames: ['client', 'config', 'presentation', 'callbacks', 'strings'],\n});\n\n/**\n * Mounts a B2B login screen inside the element provided.\n * If a login screen has already been rendered inside the element,\n * it will be updated to use the new config, style, and callback options passed in.\n * @example\n * mountB2B({\n *   client: stytchB2BClient,\n *   elementId: '#container',\n *   config: {...}\n * });\n *\n * @deprecated Prefer the StytchB2B 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 login screen.\n * @param config - A {@link StytchB2BUIConfig} object containing the products that should be registered\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 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 mount = createMountFn('stytch-ui', StytchB2B);\n"],"names":["StytchB2B","createWebComponent","AppContainer","propNames","mount","createMountFn"],"mappings":";;;AAKA;;;;;;;;;;;;;AAaC,IACM,MAAMA,SAAAA,GAAYC,kBAAAA,CAAkEC,YAAAA,EAAc;IACvGC,SAAAA,EAAW;AAAC,QAAA,QAAA;AAAU,QAAA,QAAA;AAAU,QAAA,cAAA;AAAgB,QAAA,WAAA;AAAa,QAAA;AAAU;AACzE,CAAA;AAEA;;;;;;;;;;;;;;;;;;;;AAoBC,IACM,MAAMC,KAAAA,GAAQC,aAAAA,CAAc,aAAaL,SAAAA;;;;"}