import Vue from "nativescript-vue";
import App from "./components/App";
import Home from "./components/Home";
import DrawerContent from "./components/DrawerContent";
import RadSideDrawer from "nativescript-ui-sidedrawer/vue";
import * as Platform from "tns-core-modules/platform";
import {ModalStack, VueWindowedModal, overrideModalViewMethod} from "nativescript-windowed-modal"

overrideModalViewMethod();

Vue.use(RadSideDrawer);
Vue.use(VueWindowedModal);

Vue.registerElement("ModalStack", () => ModalStack);
Vue.registerElement('MapView', () => require('nativescript-google-maps-sdk').MapView);

Vue.config.silent = true;
Vue.prototype.$isIos = Platform.isIOS;
Vue.prototype.$isAndroid = Platform.isAndroid;

new Vue({
    render (h) {
        return h(
          App,
          [
            h(DrawerContent, { slot: 'drawerContent' }),
            h(Home, { slot: 'mainContent' })
          ]
        )
      }  }).$start();
