import { RadSideDrawer , DrawerStateChangingEventArgs , DrawerStateChangedEventArgs } from "nativescript-ui-sidedrawer" ; import { Observable } from "tns-core-modules/data/observable" ; import { Frame } from "tns-core-modules/ui/frame" ; export class DrawerCallbacksModel extends Observable { constructor ( ) { super ( ) ; } public onCloseDrawerTap ( ) { let sideDrawer = < RadSideDrawer > ( Frame . topmost ( ) . getViewById ( "sideDrawer" ) ) ; sideDrawer . closeDrawer ( ) ; } public onOpenDrawerTap ( ) { let sideDrawer = < RadSideDrawer > ( Frame . topmost ( ) . getViewById ( "sideDrawer" ) ) ; sideDrawer . showDrawer ( ) ; } public onDrawerOpening ( args ) { this . set ( "currentDrawerNotification" , "Drawer opening" ) ; } public onDrawerOpened ( args ) { this . set ( "currentDrawerNotification" , "Drawer opened" ) ; } public onDrawerClosing ( args ) { this . set ( "currentDrawerNotification" , "Drawer closing" ) ; } public onDrawerClosed ( args ) { this . set ( "currentDrawerNotification" , "Drawer closed" ) ; } public onDrawerPan ( args ) { this . set ( "currentDrawerNotification" , "Drawer pan" ) ; } }