UNPKG

@salla.sa/twilight-components

Version:
92 lines (91 loc) 2.13 kB
import { EventEmitter } from '../../stencil-public-runtime'; import "@salla.sa/applepay/src/index"; export declare class SallaQuickBuy { constructor(); host: HTMLElement; /** * Button type. * * @type {string} * @default buy **/ type: 'plain' | 'buy' | 'donate' | 'book' | 'pay' | 'order'; /** * Product type. * * @type {string} **/ productType: string; /** * Product ID. * * @type {string} **/ productId: string; /** * Cart ID, when you need to applePay for existed cart * * @type {string} **/ cartId: string; /** * Product amount in base currency (SAR). * * @type {number} * @default 0 **/ amount: number; /** * base currency * * @type {string} * @default SAR */ currency: string; /** * Product options, if is empty will get the data from the document.querySelector('salla-product-options[product-id="X"]') * * @type {object} * @default {} */ options: {}; /** * To be passed to purchaseNow request * @type {boolean} **/ isRequireShipping: boolean; /** * Show Apple Pay only * @type {boolean} **/ applePayOnly: boolean; /** * Custom host for Apple Pay validate merchant URL. * When set, the validate URL will use this host instead of the store URL. * * @type {string} **/ validateHost: string; isApplePayActive: boolean; quickBuy: string; /** * Emitted when Apple Pay button is clicked but form validation fails. */ validationFailed: EventEmitter<{ productId: string; }>; /** * Emitted when Apple Pay button is clicked but user is not logged in. */ requireLogin: EventEmitter<{ productId: string; }>; private quickBuyHandler; private settlePayment; private isGuestCheckout; private getRequiredShippingContactFields; componentWillLoad(): Promise<unknown>; render(): any; private quickBuyButton; private isPhysicalProduct; }