import { Component, Output, EventEmitter, Input } from '@angular/core';
import { coerceNumberProperty } from '@angular/cdk/coercion';
import * as i0 from "@angular/core";
import * as i1 from "../../../dxc-button/dxc-button.component";
import * as i2 from "../../../dxc-button/dxc-button-icon/dxc-button-icon.component";
export class DxcUploadButtonsComponent {
    constructor() {
        this.onAddFile = new EventEmitter();
        this.upload = new EventEmitter();
        this.showOverlay = new EventEmitter();
        this.margins = { left: "small" };
    }
    get tabIndexValue() {
        return this._tabIndexValue;
    }
    set tabIndexValue(value) {
        this._tabIndexValue = coerceNumberProperty(value);
    }
    ngOnInit() { }
    ngOnChanges() { }
    onFileInput(event) {
        this.onAddFile.emit(event.target.files);
    }
    onUploadHandler() {
        this.upload.emit("upload");
    }
    dragEnter(event) {
        event.preventDefault();
        event.stopPropagation();
        this.showOverlay.emit(true);
    }
}
DxcUploadButtonsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DxcUploadButtonsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
DxcUploadButtonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: DxcUploadButtonsComponent, selector: "dxc-upload-buttons", inputs: { tabIndexValue: "tabIndexValue" }, outputs: { onAddFile: "onAddFile", upload: "upload", showOverlay: "showOverlay" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"uploadButtons\" (dragenter)=\"dragEnter($event)\">\n  <div class=\"dragAndDropLabel\">\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      enable-background=\"new 0 0 24 24\"\n      height=\"24\"\n      viewBox=\"0 0 24 24\"\n      width=\"24\"\n    >\n      <rect fill=\"none\" height=\"24\" width=\"24\" />\n      <path\n        d=\"M18,2H9C7.9,2,7,2.9,7,4v12c0,1.1,0.9,2,2,2h9c1.1,0,2-0.9,2-2V4C20,2.9,19.1,2,18,2z M18,16H9V4h9V16z M3,15v-2h2v2H3z M3,9.5h2v2H3V9.5z M10,20h2v2h-2V20z M3,18.5v-2h2v2H3z M5,22c-1.1,0-2-0.9-2-2h2V22z M8.5,22h-2v-2h2V22z M13.5,22L13.5,22l0-2h2 v0C15.5,21.1,14.6,22,13.5,22z M5,6L5,6l0,2H3v0C3,6.9,3.9,6,5,6z\"\n      />\n    </svg>\n    <label class=\"dragAreaLabel\">Drag and drop area</label>\n  </div>\n  <div class=\"buttonsContainer\">\n    <dxc-button\n      (onClick)=\"fileInput.click()\"\n      mode=\"text\"\n      label=\"Choose File\"\n      [tabIndexValue]=\"tabIndexValue\"\n    ></dxc-button>\n    <input\n      #fileInput\n      type=\"file\"\n      multiple=\"true\"\n      (change)=\"onFileInput($event)\"\n      style=\"display: none\"\n    />\n    <span class=\"uploadBtn\">\n      <dxc-button\n        (onClick)=\"onUploadHandler()\"\n        mode=\"secondary\"\n        label=\"Upload\"\n        [tabIndexValue]=\"tabIndexValue\"\n      >\n        <dxc-button-icon>\n          <svg\n            xmlns=\"http://www.w3.org/2000/svg\"\n            height=\"24\"\n            viewBox=\"0 0 24 24\"\n            width=\"24\"\n          >\n            <path d=\"M0 0h24v24H0V0z\" fill=\"none\" />\n            <path\n              d=\"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3zM8 13h2.55v3h2.9v-3H16l-4-4z\"\n            />\n          </svg>\n        </dxc-button-icon>\n      </dxc-button>\n    </span>\n  </div>\n</div>\n", styles: [":host{display:block}:host .dragAndDropLabel{display:flex;align-items:center;margin-right:50px}:host .dragAndDropLabel .dragAreaLabel{margin-left:5px;font-size:var(--upload-dragAndDropAreaTextFontSize);font-style:var(--upload-dragAndDropAreaTextFontStyle);font-weight:var(--upload-dragAndDropAreaTextFontWeight);text-transform:var(--upload-dragAndDropAreaTextFontTextTransform);color:var(--upload-dragAndDropAreaTextFontColor);font-family:var(--upload-fontFamily)}:host .dragAndDropLabel svg{fill:var(--upload-dragAndDropAreaIconColor);height:var(--upload-dragAndDropAreaIconSize);width:var(--upload-dragAndDropAreaIconSize)}:host .buttonsContainer .uploadBtn{margin-left:8px}:host .uploadButtons{display:flex;align-items:center;justify-content:space-between;padding:0 24px}\n"], components: [{ type: i1.DxcButtonComponent, selector: "dxc-button", inputs: ["mode", "disabled", "label", "iconSrc", "iconPosition", "margin", "size", "tabIndexValue"], outputs: ["onClick"] }, { type: i2.DxcButtonIconComponent, selector: "dxc-button-icon" }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: DxcUploadButtonsComponent, decorators: [{
            type: Component,
            args: [{ selector: "dxc-upload-buttons", template: "<div class=\"uploadButtons\" (dragenter)=\"dragEnter($event)\">\n  <div class=\"dragAndDropLabel\">\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      enable-background=\"new 0 0 24 24\"\n      height=\"24\"\n      viewBox=\"0 0 24 24\"\n      width=\"24\"\n    >\n      <rect fill=\"none\" height=\"24\" width=\"24\" />\n      <path\n        d=\"M18,2H9C7.9,2,7,2.9,7,4v12c0,1.1,0.9,2,2,2h9c1.1,0,2-0.9,2-2V4C20,2.9,19.1,2,18,2z M18,16H9V4h9V16z M3,15v-2h2v2H3z M3,9.5h2v2H3V9.5z M10,20h2v2h-2V20z M3,18.5v-2h2v2H3z M5,22c-1.1,0-2-0.9-2-2h2V22z M8.5,22h-2v-2h2V22z M13.5,22L13.5,22l0-2h2 v0C15.5,21.1,14.6,22,13.5,22z M5,6L5,6l0,2H3v0C3,6.9,3.9,6,5,6z\"\n      />\n    </svg>\n    <label class=\"dragAreaLabel\">Drag and drop area</label>\n  </div>\n  <div class=\"buttonsContainer\">\n    <dxc-button\n      (onClick)=\"fileInput.click()\"\n      mode=\"text\"\n      label=\"Choose File\"\n      [tabIndexValue]=\"tabIndexValue\"\n    ></dxc-button>\n    <input\n      #fileInput\n      type=\"file\"\n      multiple=\"true\"\n      (change)=\"onFileInput($event)\"\n      style=\"display: none\"\n    />\n    <span class=\"uploadBtn\">\n      <dxc-button\n        (onClick)=\"onUploadHandler()\"\n        mode=\"secondary\"\n        label=\"Upload\"\n        [tabIndexValue]=\"tabIndexValue\"\n      >\n        <dxc-button-icon>\n          <svg\n            xmlns=\"http://www.w3.org/2000/svg\"\n            height=\"24\"\n            viewBox=\"0 0 24 24\"\n            width=\"24\"\n          >\n            <path d=\"M0 0h24v24H0V0z\" fill=\"none\" />\n            <path\n              d=\"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3zM8 13h2.55v3h2.9v-3H16l-4-4z\"\n            />\n          </svg>\n        </dxc-button-icon>\n      </dxc-button>\n    </span>\n  </div>\n</div>\n", styles: [":host{display:block}:host .dragAndDropLabel{display:flex;align-items:center;margin-right:50px}:host .dragAndDropLabel .dragAreaLabel{margin-left:5px;font-size:var(--upload-dragAndDropAreaTextFontSize);font-style:var(--upload-dragAndDropAreaTextFontStyle);font-weight:var(--upload-dragAndDropAreaTextFontWeight);text-transform:var(--upload-dragAndDropAreaTextFontTextTransform);color:var(--upload-dragAndDropAreaTextFontColor);font-family:var(--upload-fontFamily)}:host .dragAndDropLabel svg{fill:var(--upload-dragAndDropAreaIconColor);height:var(--upload-dragAndDropAreaIconSize);width:var(--upload-dragAndDropAreaIconSize)}:host .buttonsContainer .uploadBtn{margin-left:8px}:host .uploadButtons{display:flex;align-items:center;justify-content:space-between;padding:0 24px}\n"] }]
        }], propDecorators: { tabIndexValue: [{
                type: Input
            }], onAddFile: [{
                type: Output
            }], upload: [{
                type: Output
            }], showOverlay: [{
                type: Output
            }] } });
//# sourceMappingURL=data:application/json;base64, 