import { Color , View } from '@nativescript/core' ; export interface SnackBarOptions { /**
     * The action button text of the snackbar.
     */ actionText ? : string ; /**
     * The text of the snackbar.
     */ message : string ; /**
     * Delay to hide the snackbar.
     */ hideDelay ? : number ; /**
     * Action Text Color of the snackbar.
     */ actionTextColor ? : string | Color ; /**
     * Text Color of the snackbar.
     */ textColor ? : string | Color ; /**
     * Background Color of the snackbar.
     */ backgroundColor ? : string | Color ; /**
     * *Android Only*
     * Set the maxLines if you are displaying a long string of text and it will wrap.
     */ maxLines ? : number ; /**
     * *Android Only*
     * Use RTL for textview of snackbar.
     */ isRTL ? : boolean ; /**
     * The View to which the snackbar will be attached. Useful with modals.
     * Default to Frame.topmost().currentPage
     */ view ? : View ; /**
     * The view you want to "anchor the snack above".
     * The snackbar will appear above that view
     */ anchorView ? : View ; } export enum DismissReasons { SWIPE = 'swipe' , ACTION = 'action' , TIMEOUT = 'timeout' , MANUAL = 'manual' , CONSECUTIVE = 'consecutive' , UNKNOWN = 'unknown' } export enum SnackBarAction { ACTION = 'action' , NONE = 'none' , DISMISS = 'dismiss' } export abstract class SnackBarBase { _options : SnackBarOptions ; constructor ( options ? ) { this . _options = options ; } public simple ( message , textColor ? , backgroundColor ? , maxLines ? , isRTL ? , view ? ) { return this . showSnack ( { message , textColor , backgroundColor , maxLines , isRTL , view } ) ; } public action ( options ) { return this . showSnack ( options ) ; } public showSnack ( options ) { this . _options = options ; return this . show ( ) ; } abstract show ( ) ; abstract dismiss ( ) ; abstract initSnack ( options , resolve ? ) ; }