import { EventEmitter } from '../../stencil-public-runtime'; import { StripeDidLoadedHandler, StripeLoadedEvent, ProgressStatus, InitStripeOptions, LinkAuthenticationElementChangeEvent, LinkAuthenticationElementChangeHandler } from '../../interfaces'; export declare class StripeLinkAuthenticationElement { el: HTMLStripeLinkAuthenticationElementElement; private stripeService; private linkAuthenticationElementManager; /** * Your Stripe publishable API key. */ publishableKey: string; updatePublishableKey(publishableKey: string): void; /** * Optional. Making API calls for connected accounts * @info https://stripe.com/docs/connect/authentication */ stripeAccount: string; updateStripeAccountId(stripeAccount: string): void; /** * Overwrite the application name that registered * For wrapper library (like Capacitor) */ applicationName: string; /** * Default email value to prefill the element */ defaultEmail?: string; /** * The progress status */ progress: ProgressStatus; /** * Link Authentication Element change handler */ handleChange?: LinkAuthenticationElementChangeHandler; /** * Stripe.js class loaded handler */ stripeDidLoaded?: StripeDidLoadedHandler; /** * Get Stripe.js, and initialize elements * @param publishableKey * @param options * @example * ``` * const stripeElement = document.createElement('stripe-link-authentication-element'); * customElements * .whenDefined('stripe-link-authentication-element') * .then(() => { * stripeElement.initStripe('pk_test_XXXXXXXXX') * }) * ``` */ initStripe(publishableKey: string, options?: InitStripeOptions): Promise; /** * Update the progress status * @param progress * @returns * @example * ``` * const stripeElement = document.createElement('stripe-link-authentication-element'); * customElements * .whenDefined('stripe-link-authentication-element') * .then(() => { * stripeElement.updateProgress('success') * }) * ``` */ updateProgress(progress: ProgressStatus): Promise; /** * Set error message * @param errorMessage string * @returns * @example * ``` * const stripeElement = document.createElement('stripe-link-authentication-element'); * customElements * .whenDefined('stripe-link-authentication-element') * .then(() => { * stripeElement.setErrorMessage('Invalid email address') * }) * ``` */ setErrorMessage(errorMessage: string): Promise; /** * Get the current email value from the element * @returns {Promise} The current email value or undefined * @example * ``` * const stripeElement = document.createElement('stripe-link-authentication-element'); * customElements * .whenDefined('stripe-link-authentication-element') * .then(async () => { * const email = await stripeElement.getEmail(); * console.log(email); * }) * ``` */ getEmail(): Promise; /** * Stripe Client loaded event * @example * ``` * const stripeElement = document.createElement('stripe-link-authentication-element'); * customElements * .whenDefined('stripe-link-authentication-element') * .then(() => { * stripeElement * .addEventListener('stripeLoaded', async ({ detail: {stripe} }) => { * console.log('Stripe loaded:', stripe); * }); * }) * ``` */ stripeLoaded: EventEmitter; private stripeLoadedEventHandler; /** * Link Authentication Element change event * Emitted when the email value changes * @example * ``` * const stripeElement = document.createElement('stripe-link-authentication-element'); * customElements * .whenDefined('stripe-link-authentication-element') * .then(() => { * stripeElement * .addEventListener('linkAuthenticationChange', async ({ detail }) => { * console.log('Email changed:', detail.email); * }) * }) * ``` */ linkAuthenticationChange: EventEmitter; private linkAuthenticationChangeEventHandler; componentWillRender(): void; constructor(); /** * Initialize Component using Stripe Element */ private initElement; componentDidLoad(): void; disconnectedCallback(): void; render(): any; }