/*!
 *
 * carbon-angular v0.0.5 | file.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.
 */


import { Component, Input, Output, EventEmitter, HostBinding } from "@angular/core";
import { I18n } from "../i18n/i18n.module";
var File = /** @class */ (function () {
    function File(i18n) {
        this.i18n = i18n;
        /**
         * Accessible translations for the close and complete icons
         */
        this.translations = this.i18n.get().FILE_UPLOADER;
        this.remove = new EventEmitter();
        this.selectedFile = true;
    }
    File.decorators = [
        { type: Component, args: [{
                    selector: "ibm-file",
                    template: "\n\t\t<p class=\"bx--file-filename\">{{fileItem.file.name}}</p>\n\t\t<span\n\t\t\t*ngIf=\"fileItem.state === 'edit'\"\n\t\t\tclass=\"bx--file__state-container\"\n\t\t\t(click)=\"remove.emit()\"\n\t\t\t(keyup.enter)=\"remove.emit()\"\n\t\t\t(keyup.space)=\"remove.emit()\"\n\t\t\ttabindex=\"0\">\n\t\t\t<ibm-icon-close16\n\t\t\t\tclass=\"bx--file-close\"\n\t\t\t\t[ariaLabel]=\"translations.REMOVE_BUTTON\">\n\t\t\t</ibm-icon-close16>\n\t\t</span>\n\t\t<span *ngIf=\"fileItem.state === 'upload'\">\n\t\t\t<ibm-loading size=\"sm\"></ibm-loading>\n\t\t</span>\n\t\t<span\n\t\t\t*ngIf=\"fileItem.state === 'complete'\"\n\t\t\tclass=\"bx--file__state-container\"\n\t\t\ttabindex=\"0\">\n\t\t\t<ibm-icon-checkmark-filled16\n\t\t\t\tclass=\"bx--file-complete\"\n\t\t\t\t[ariaLabel]=\"translations.CHECKMARK\">\n\t\t\t</ibm-icon-checkmark-filled16>\n\t\t</span>\n\t"
                },] },
    ];
    /** @nocollapse */
    File.ctorParameters = function () { return [
        { type: I18n }
    ]; };
    File.propDecorators = {
        translations: [{ type: Input }],
        fileItem: [{ type: Input }],
        remove: [{ type: Output }],
        selectedFile: [{ type: HostBinding, args: ["class.bx--file__selected-file",] }]
    };
    return File;
}());
export { File };
//# sourceMappingURL=file.component.js.map