import { EampluginCommon } from './common';
import { Application as app } from "@nativescript/core";
var _dux = null;
var _eam = null;
var _login = null;
export class Eamplugin extends EampluginCommon {
    login(login) {
        _dux = app.ios.window.rootViewController;
        if (_eam == null) {
            _eam = EAMLoginViewController.new();
            _eam.loadViewIfNeeded();
            _login = Login.new();
            _login.userName = login.userName;
            _login.password = login.password;
            _login.externalUserName = login.externalUserName;
            _login.organization = login.organization;
            _login.serverURL = login.serverURL;
            _login.connectionId = login.connectionId;
            _eam.autoLogin(_login);
        }
    }
    show() {
        app.ios.window.rootViewController = _eam;
    }
    hide() {
        _eam = app.ios.window.rootViewController;
        app.ios.window.rootViewController = _dux;
    }
}
let AppDelegate = EAMAppDelegate;
let LoginModel = Login;
export { AppDelegate, LoginModel };
//# sourceMappingURL=index.ios.js.map