@salla.sa/twilight-components
Version:
Salla Web Component
24 lines (23 loc) • 864 B
TypeScript
import { AppInstallAlertData } from './interfaces';
export declare class SallaAppInstallAlert {
alertDelay: NodeJS.Timeout;
connectedCallback(): void;
disconnectedCallback(): void;
data: AppInstallAlertData | null;
ctaLink: string;
open: boolean;
closing: boolean;
private host;
/**
* Check if the website opens from mobile or tablet devices only (android/ios).
* Uses matchMedia instead of window.innerWidth to avoid forced reflow (Lighthouse/PageSpeed).
* Guards against SSR/non-browser contexts (window, navigator, document).
*
* @param {number} screen the width of the biggest screen to be checked (default 1024)
* @returns {boolean} true if it is mobile or tablet else false
*/
private isMobileOrTabletDevice;
closeAlert(): void;
private shouldShowAlert;
render(): any;
}