import { type PropType, type Ref, type ShallowRef } from 'vue-demi'; import type { StripeEmbeddedCheckout, StripeEmbeddedCheckoutAnalyticsEventUnion, StripeEmbeddedCheckoutOptions } from '@stripe/stripe-js'; import type { VueStripeComponent } from '../utils/element-types.js'; declare const embeddedCheckoutProps: { /** Client secret of a Checkout Session created with `ui_mode: 'embedded_page'`. */ clientSecret: { type: PropType; default: undefined; }; /** Alternative to `clientSecret`: a function resolving to the client secret. */ fetchClientSecret: { type: PropType<(() => Promise) | undefined>; default: undefined; }; /** * Called when the customer changes line items; resolve `{ type: 'accept' }` or * `{ type: 'reject', errorMessage }`. Required when the session sets * `permissions.update.line_items: 'server_only'`. */ onLineItemsChange: { type: PropType; default: undefined; }; }; /** Template ref members. */ type EmbeddedCheckoutExposed = { /** The Embedded Checkout instance once created. */ checkout: ShallowRef; /** `true` until the page is mounted. */ loading: Ref; /** Message of the last failure. */ error: Ref; }; /** Event name -> payload. */ type EmbeddedCheckoutEvents = { ready: [checkout: StripeEmbeddedCheckout]; complete: []; analytics: [event: StripeEmbeddedCheckoutAnalyticsEventUnion]; error: [message: string]; }; /** * Stripe's prebuilt Checkout page embedded in your site * (`stripe.createEmbeddedCheckoutPage()`, `ui_mode: 'embedded_page'`). * * Mounts once Stripe has loaded and destroys the page on unmount. To switch to * another Checkout Session, re-mount the component (e.g. change its `key`). */ declare const _default: VueStripeComponent; export default _default;