import { Page , ShownModallyData } from "@nativescript/core" ; let closeCallback ; export function showingModally ( args ) { closeCallback = args . closeCallback ; ( args . object as Page ) . content . set ( "backgroundColor" , args . context . dim ) ; console . log ( "Modal context: " + args . context . message ) ; } export function buttonTap ( ) { closeCallback ( "Return response here" ) ; }