{"version":3,"file":"stytchPasskeyRegistration.mjs","sources":["../../../src/b2c/stytchPasskeyRegistration.ts"],"sourcesContent":["import type { StytchProjectConfigurationInput } from '@stytch/core/public';\nimport { PasskeyRegistrationContainer, SDKConfig } from '@stytch/web';\n\nimport { createMountFn, createWebComponent } from '../bindings/WebComponents';\n\nconst defaultSdkProps = ['client', 'config', 'presentation', 'callbacks', 'strings'] as const;\n\n/**\n * Renders a Passkey registration screen.\n *\n * @attr {boolean} [shadow] - use shadow DOM to contain styles\n *\n * @prop {StytchClient} client - used to make API calls.\n * @prop {StytchLoginConfig} 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('./idpWebComponent').StytchEvent}\n * @event StytchError - see {@link import('./idpWebComponent').StytchError}\n *\n */\nexport const StytchPasskeyRegistration = createWebComponent<SDKConfig<StytchProjectConfigurationInput>>(\n  PasskeyRegistrationContainer,\n  {\n    propNames: defaultSdkProps,\n  },\n);\n\n/**\n * Mounts a Passkey registration screen inside the element provided.\n * If a passkey registration 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 * mountPasskeyRegistration({\n *   client: stytchClient,\n *   elementId: '#login-container',\n *   config: {...}\n * });\n *\n * @deprecated Use the StytchPasskeyRegistration web component instead\n *\n * @param client - A {@link StytchClient} 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 StytchLoginConfig} 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 mountPasskeyRegistration = createMountFn('stytch-passkey-registration', StytchPasskeyRegistration);\n"],"names":["defaultSdkProps","StytchPasskeyRegistration","createWebComponent","PasskeyRegistrationContainer","propNames","mountPasskeyRegistration","createMountFn"],"mappings":";;;AAKA,MAAMA,iBAAAA,GAAkB;AAAC,IAAA,QAAA;AAAU,IAAA,QAAA;AAAU,IAAA,cAAA;AAAgB,IAAA,WAAA;AAAa,IAAA;AAAU,CAAA;AAEpF;;;;;;;;;;;;;AAaC,IACM,MAAMC,yBAAAA,GAA4BC,kBAAAA,CACvCC,4BAAAA,EACA;IACEC,SAAAA,EAAWJ;AACb,CAAA;AAGF;;;;;;;;;;;;;;;;;;;;AAoBC,IACM,MAAMK,wBAAAA,GAA2BC,aAAAA,CAAc,+BAA+BL,yBAAAA;;;;"}