import { type ComponentOptionsMixin, type DefineComponent, type Ref } from 'vue-demi'; import type { Stripe, StripeError } from '@stripe/stripe-js'; import type { StatusSlots, WithSlots } from './element-types.js'; /** `stripe` prop of a disclosure: an instance, a Promise of one, or `null` (React Stripe.js parity). */ export type DisclosureStripeProp = Stripe | PromiseLike | null; /** What `error` emits: Stripe's error, or `{ message }` when the call itself fails. */ export type DisclosureError = StripeError | { message: string; }; /** Options of `VueStripeFinancialAccountDisclosure` (React Stripe.js `FinancialAccountDisclosure`). */ export interface FinancialAccountDisclosureOptions { /** Business name shown in the disclosure; inferred from the Stripe account when omitted. */ businessName?: string | undefined; /** Supplemental link where your users can learn more. */ learnMoreLink?: string | undefined; } /** Options of `VueStripeIssuingDisclosure` (React Stripe.js `IssuingDisclosure`). */ export interface IssuingDisclosureOptions { /** ID of the Issuing program to show the disclosure for. */ issuingProgramID?: string | undefined; /** Public name of the Issuing card program. */ publicCardProgramName?: string | undefined; /** Supplemental link where your users can learn more. */ learnMoreLink?: string | undefined; } /** Options of `VueStripeTreasuryDisclosure` (React Stripe.js `TreasuryDisclosure`). */ export interface TreasuryDisclosureOptions { /** Business name shown in the disclosure; inferred from the Stripe account when omitted. */ businessName?: string | undefined; /** Supplemental link where your users can learn more. */ learnMoreLink?: string | undefined; } interface DisclosureDefinition { componentName: string; /** The Stripe instance method, e.g. 'createIssuingDisclosure'. */ method: string; /** Option keys forwarded to the method (React Stripe.js passes each one, set or not). */ optionKeys: ReadonlyArray; className: string; } /** Public type of a disclosure component. */ export type StripeDisclosureComponent = WithSlots; error: Ref; }, Record, Record, Record, ComponentOptionsMixin, ComponentOptionsMixin, { load: () => void; error: (error: DisclosureError) => void; }>, StatusSlots>; /** * Builds a React Stripe.js 7 style disclosure: it calls `stripe.(options)` and * mounts the legal text element Stripe.js returns. Stripe comes from the `stripe` prop * or, without one, from the surrounding ``. */ export declare function createStripeDisclosure(def: DisclosureDefinition): StripeDisclosureComponent; export {};