@salla.sa/twilight-components
Version:
Salla Web Component
36 lines (35 loc) • 1.02 kB
TypeScript
import Offer from "./offer-schema";
/**
* @slot header - The top of the popup, has replaceable props `{name}`, `{message}`.
* @slot product - Replaces product card, has replaceable props `{name}`, `{url}`, `{image}`, `{price}`.
* @slot category - Replaces Category badge, has replaceable props `{name}`, `{url}`.
*/
export declare class SallaOfferModal {
private categorySlot;
private modal;
host: HTMLElement;
offer: null | Offer;
offer_name: string;
offer_message: string;
hasError: boolean;
errorMessage: string;
productID: number;
offer_type: string;
constructor();
translationLoaded: boolean;
addToCartLabel: string;
/**
* Show the available offers for the product
* @param product_id
*/
open(product_id: number): Promise<any>;
/**
* Show offer details
* @param {Offer} offer
*/
showOffer(offer: any): Promise<void>;
private rememberMe;
private addToCart;
private getOfferContent;
render(): any;
}