"use strict";
var __extends = (this && this.__extends) || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1 = require("@angular/core");
var static_1 = require("@angular/upgrade/static");
var angular = require("angular");
var _ = require("lodash");
var moment = require("moment");
require("moment-timezone");
var typescript_angular_utilities_1 = require("typescript-angular-utilities");
var __timezone = typescript_angular_utilities_1.services.timezone;
exports.moduleName = 'InputTestModule';
var InputTestController = (function () {
    function InputTestController($q) {
        this.$q = $q;
    }
    InputTestController.prototype.$onInit = function () {
        var _this = this;
        this.options = [
            { name: 'item1', value: 1 },
            { name: 'item2', value: 2 },
            { name: 'item3', value: 3 },
            { name: 'item4', value: 4 },
            { name: 'item5', value: 5 },
        ];
        this.typeaheadList = [this.options[0], this.options[4]];
        this.useSearch = true;
        this.date = moment('2016-04-01T12:00:00.000-08:00').tz('US/Pacific');
        __timezone.timezoneService.setCurrentTimezone('-08:00');
        this.greaterThanFive1 = {
            validate: function () { return _this.validate1 > 5; },
            errorMessage: 'Must be greater than 5',
        };
        this.greaterThanFive2 = {
            validate: function () { return _this.validate2 > 5; },
            errorMessage: 'Must be greater than 5',
        };
        this.lessThanTen = {
            validate: function () { return _this.validate2 < 10; },
            errorMessage: 'Must be less than 10',
        };
    };
    InputTestController.prototype.select = function (value) {
        this.set.push(value);
    };
    InputTestController.prototype.create = function (value) {
        return {
            name: value,
        };
    };
    InputTestController.prototype.getOptions = function () {
        return this.$q.when(_.clone(this.options));
    };
    InputTestController.prototype.logDates = function () {
        var format = 'YYYY-MM-DDTHH:mm:ssZ';
        console.log(this.date.format(format));
        console.log(this.date2.format(format));
    };
    InputTestController.prototype.log = function (message) {
        console.log(message);
    };
    return InputTestController;
}());
InputTestController.$inject = ['$q'];
var InputsNg1BootstrapperComponent = (function () {
    function InputsNg1BootstrapperComponent() {
    }
    return InputsNg1BootstrapperComponent;
}());
InputsNg1BootstrapperComponent = __decorate([
    core_1.Component({
        selector: 'tsInputsNg1Bootstrapper',
        template: '<tsInputsNg1></tsInputsNg1>'
    })
], InputsNg1BootstrapperComponent);
exports.InputsNg1BootstrapperComponent = InputsNg1BootstrapperComponent;
var InputsNg1Directive = (function (_super) {
    __extends(InputsNg1Directive, _super);
    function InputsNg1Directive(elementRef, injector) {
        return _super.call(this, 'tsInputsNg1', elementRef, injector) || this;
    }
    return InputsNg1Directive;
}(static_1.UpgradeComponent));
InputsNg1Directive = __decorate([
    core_1.Directive({
        selector: 'tsInputsNg1'
    }),
    __metadata("design:paramtypes", [core_1.ElementRef, core_1.Injector])
], InputsNg1Directive);
exports.InputsNg1Directive = InputsNg1Directive;
angular.module(exports.moduleName, [])
    .component('tsInputsNg1', {
    template: require('./inputsNg1.html'),
    controller: 'InputTestController',
    controllerAs: 'input',
})
    .controller('InputTestController', InputTestController);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXRCb290c3RyYXBwZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbnB1dEJvb3RzdHJhcHBlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7QUFBQSxzQ0FBMkU7QUFDM0Usa0RBQTJEO0FBQzNELGlDQUFtQztBQUN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