/*!
 *
 * carbon-angular v0.0.5 | timepicker-select.component.js
 *
 * Copyright 2014, 2019 IBM
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0

 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
import { Component, Input, Output, EventEmitter, HostBinding } from "@angular/core";
import { Select } from "../select/select.component";
/**
 * [See demo](../../?path=/story/time-picker-select--simple)
 *
 * <example-url>../../iframe.html?id=time-picker-select--simple</example-url>
 *
 * @export
 * @class TimePickerSelect
 * @extends {Select}
 */
var TimePickerSelect = /** @class */ (function (_super) {
    __extends(TimePickerSelect, _super);
    function TimePickerSelect() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.timeSelect = true;
        _this.timePickerSelect = true;
        _this.id = "timepicker-select-" + TimePickerSelect.selectCount++;
        /**
         * Set to true for a loading select.
         */
        _this.skeleton = false;
        /**
         * `light` or `dark` select theme
         */
        _this.theme = "dark";
        _this.timePickerSelectSkeleton = _this.skeleton;
        _this.valueChange = new EventEmitter();
        return _this;
    }
    Object.defineProperty(TimePickerSelect.prototype, "timePickerSelectLight", {
        get: function () {
            return this.theme === "light";
        },
        enumerable: true,
        configurable: true
    });
    TimePickerSelect.prototype.onChange = function (event) {
        this.valueChange.emit(event.target.value);
    };
    TimePickerSelect.decorators = [
        { type: Component, args: [{
                    selector: "ibm-timepicker-select",
                    template: "\n\t\t\t<label *ngIf=\"!skeleton && label\" [attr.for]=\"id\" class=\"bx--label bx--visually-hidden\">{{label}}</label>\n\t\t\t<select\n\t\t\t\t#select\n\t\t\t\t[attr.id]=\"id\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t(change)=\"onChange($event)\"\n\t\t\t\tclass=\"bx--select-input\">\n\t\t\t\t<ng-content></ng-content>\n\t\t\t</select>\n\t\t\t<ibm-icon-chevron-down16 *ngIf=\"!skeleton\" class=\"bx--select__arrow\"></ibm-icon-chevron-down16>\n\t"
                },] },
    ];
    TimePickerSelect.propDecorators = {
        timeSelect: [{ type: HostBinding, args: ["class.bx--select",] }],
        timePickerSelect: [{ type: HostBinding, args: ["class.bx--time-picker__select",] }],
        id: [{ type: Input }],
        skeleton: [{ type: Input }],
        theme: [{ type: Input }],
        label: [{ type: Input }],
        timePickerSelectSkeleton: [{ type: HostBinding, args: ["class.bx--skeleton",] }],
        timePickerSelectLight: [{ type: HostBinding, args: ["class.bx--select--light",] }],
        valueChange: [{ type: Output }]
    };
    return TimePickerSelect;
}(Select));
export { TimePickerSelect };
//# sourceMappingURL=timepicker-select.component.js.map