@nuxt/scripts
Version:
Load third-party scripts with better performance, privacy and DX in Nuxt Apps.
74 lines (73 loc) • 3.48 kB
text/typescript
import { type HTMLAttributes, type ReservedProps } from 'vue';
import type { OnApproveActions, OnApproveData, OnCancelledActions, OnClickActions, OnShippingAddressChangeActions, OnShippingAddressChangeData, OnShippingOptionsChangeActions, OnShippingOptionsChangeData, PayPalButtonsComponentOptions, OnInitActions } from '@paypal/paypal-js';
import type { ElementScriptTrigger } from '#nuxt-scripts/types';
import type { PayPalInput } from '../registry/paypal.js';
type __VLS_Props = {
/**
* Customize the root element attributes.
*/
rootAttrs?: HTMLAttributes & ReservedProps & Record<string, unknown>;
/**
* Defines the trigger event to load the script.
*/
trigger?: ElementScriptTrigger;
/**
* The client id for the paypal script.
*/
clientId?: string;
/**
* The options for the paypal buttons.
*/
buttonOptions?: PayPalButtonsComponentOptions;
/**
* The paypal script options.
*/
paypalScriptOptions?: Partial<PayPalInput>;
/**
* Disables the paypal buttons.
*/
disabled?: boolean;
};
declare var __VLS_1: {}, __VLS_3: {}, __VLS_10: {}, __VLS_12: {}, __VLS_14: {};
type __VLS_Slots = {} & {
placeholder?: (props: typeof __VLS_1) => any;
} & {
loading?: (props: typeof __VLS_3) => any;
} & {
awaitingLoad?: (props: typeof __VLS_10) => any;
} & {
error?: (props: typeof __VLS_12) => any;
} & {
default?: (props: typeof __VLS_14) => any;
};
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
error: (error: Record<string, unknown>) => any;
init: (data: Record<string, unknown>, actions: OnInitActions) => any;
cancel: (data: Record<string, unknown>, actions: OnCancelledActions) => any;
approve: (data: OnApproveData, actions: OnApproveActions) => any;
clickButtons: (data: Record<string, unknown>, actions: OnClickActions) => any;
shippingOptionsChange: (data: OnShippingOptionsChangeData, actions: OnShippingOptionsChangeActions) => any;
shippingAddressChange: (data: OnShippingAddressChangeData, actions: OnShippingAddressChangeActions) => any;
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
onError?: ((error: Record<string, unknown>) => any) | undefined;
onInit?: ((data: Record<string, unknown>, actions: OnInitActions) => any) | undefined;
onCancel?: ((data: Record<string, unknown>, actions: OnCancelledActions) => any) | undefined;
onApprove?: ((data: OnApproveData, actions: OnApproveActions) => any) | undefined;
onClickButtons?: ((data: Record<string, unknown>, actions: OnClickActions) => any) | undefined;
onShippingOptionsChange?: ((data: OnShippingOptionsChangeData, actions: OnShippingOptionsChangeActions) => any) | undefined;
onShippingAddressChange?: ((data: OnShippingAddressChangeData, actions: OnShippingAddressChangeActions) => any) | undefined;
}>, {
trigger: ElementScriptTrigger;
disabled: boolean;
clientId: string;
buttonOptions: PayPalButtonsComponentOptions;
paypalScriptOptions: Partial<PayPalInput>;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
declare const _default: typeof __VLS_export;
export default _default;
type __VLS_WithSlots<T, S> = T & {
new (): {
$slots: S;
};
};