"use strict";
var core_1 = require('@angular/core');
var platform_browser_1 = require('@angular/platform-browser');
var action_sheet_1 = require('./components/action-sheet/action-sheet');
var alert_1 = require('./components/alert/alert');
var app_1 = require('./components/app/app');
var config_1 = require('./config/config');
var events_1 = require('./util/events');
var feature_detect_1 = require('./util/feature-detect');
var form_1 = require('./util/form');
var gesture_controller_1 = require('./gestures/gesture-controller');
var gesture_config_1 = require('./gestures/gesture-config');
var keyboard_1 = require('./util/keyboard');
var loading_1 = require('./components/loading/loading');
var menu_controller_1 = require('./components/menu/menu-controller');
var modal_1 = require('./components/modal/modal');
var picker_1 = require('./components/picker/picker');
var platform_1 = require('./platform/platform');
var popover_1 = require('./components/popover/popover');
var deep_linker_1 = require('./navigation/deep-linker');
var query_params_1 = require('./platform/query-params');
var tap_click_1 = require('./components/tap-click/tap-click');
var toast_1 = require('./components/toast/toast');
var translate_1 = require('./translation/translate');
var transition_controller_1 = require('./transitions/transition-controller');
var app_root_1 = require('./components/app/app-root');
var deep_linker_2 = require('./navigation/deep-linker');
exports.DeepLinker = deep_linker_2.DeepLinker;
exports.provideDeepLinker = deep_linker_2.provideDeepLinker;
var nav_controller_1 = require('./navigation/nav-controller');
exports.NavController = nav_controller_1.NavController;
var nav_params_1 = require('./navigation/nav-params');
exports.NavParams = nav_params_1.NavParams;
var nav_util_1 = require('./navigation/nav-util');
exports.DeepLink = nav_util_1.DeepLink;
var view_controller_1 = require('./navigation/view-controller');
exports.ViewController = view_controller_1.ViewController;
function ionicProviders(userRoot, userConfig, userDeepLinkConfig) {
    return [
        { provide: core_1.ANALYZE_FOR_ENTRY_COMPONENTS, useValue: userRoot, multi: true },
        { provide: platform_browser_1.HAMMER_GESTURE_CONFIG, useClass: gesture_config_1.IonicGestureConfig },
        { provide: platform_1.UserAgent, useFactory: getWindowUserAgent },
        { provide: platform_1.UserDir, useFactory: getDocumentDir },
        { provide: platform_1.UserLang, useFactory: getDocumentLang },
        { provide: platform_1.UserNavigatorPlatform, useFactory: getWindowPlatform },
        { provide: app_root_1.UserRoot, useValue: userRoot },
        { provide: query_params_1.UserUrl, useFactory: getWindowLocation },
        config_1.provideConfig(userConfig),
        deep_linker_1.provideDeepLinker(userDeepLinkConfig),
        events_1.provideEvents(),
        platform_1.providePlatform(),
        query_params_1.provideQueryParams(),
        tap_click_1.provideTapClick(),
        action_sheet_1.ActionSheetController,
        alert_1.AlertController,
        app_1.App,
        form_1.Form,
        feature_detect_1.FeatureDetect,
        gesture_controller_1.GestureController,
        keyboard_1.Keyboard,
        loading_1.LoadingController,
        menu_controller_1.MenuController,
        modal_1.ModalController,
        picker_1.PickerController,
        popover_1.PopoverController,
        tap_click_1.TapClick,
        toast_1.ToastController,
        translate_1.Translate,
        transition_controller_1.TransitionController
    ];
}
exports.ionicProviders = ionicProviders;
function getWindowUserAgent() {
    return window && window.navigator.userAgent;
}
exports.getWindowUserAgent = getWindowUserAgent;
function getWindowPlatform() {
    return window && window.navigator.platform;
}
exports.getWindowPlatform = getWindowPlatform;
function getWindowLocation() {
    return window && window.location.href;
}
exports.getWindowLocation = getWindowLocation;
function getDocumentDir() {
    return document && document.documentElement.dir;
}
exports.getDocumentDir = getDocumentDir;
function getDocumentLang() {
    return document && document.documentElement.lang;
}
exports.getDocumentLang = getDocumentLang;
