// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to
//  deal in the Software without restriction, including without limitation the
//  rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
//  sell copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
import { CdkDrag, CdkDropList } from "@angular/cdk/drag-drop";
import { Component, EventEmitter, Input, Output, TemplateRef, ViewChild, } from "@angular/core";
import { DroppableComponent } from "./droppable.component";
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@angular/cdk/drag-drop";
/**
 * @ignore
 */
export class DraggableComponent {
    constructor() {
        this.dragHandle = false;
        this.dragStart = new EventEmitter();
        this.dragEnd = new EventEmitter();
    }
    ngOnInit() {
        this.dragElement.dropContainer = this.dropTarget.dropList;
    }
}
DraggableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: DraggableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
DraggableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.5", type: DraggableComponent, selector: "nui-draggable", inputs: { payload: "payload", dropTarget: "dropTarget", dragHandle: "dragHandle", dragPreview: "dragPreview" }, outputs: { dragStart: "dragStart", dragEnd: "dragEnd" }, viewQueries: [{ propertyName: "dropList", first: true, predicate: CdkDropList, descendants: true, static: true }, { propertyName: "dragElement", first: true, predicate: CdkDrag, descendants: true, static: true }], ngImport: i0, template: "<div cdkDropList [cdkDropListConnectedTo]=\"[dropTarget.dropList]\">\n    <div\n        cdkDrag\n        [cdkDragData]=\"payload\"\n        [class.cdk-drag-with-handle]=\"dragHandle\"\n    >\n        <svg\n            *ngIf=\"dragHandle\"\n            cdkDragHandle\n            width=\"24px\"\n            fill=\"currentColor\"\n            viewBox=\"0 0 24 24\"\n        >\n            <path\n                d=\"M10 9h4V6h3l-5-5-5 5h3v3zm-1 1H6V7l-5 5 5 5v-3h3v-4zm14 2l-5-5v3h-3v4h3v3l5-5zm-9 3h-4v3H7l5 5 5-5h-3v-3z\"\n            ></path>\n            <path d=\"M0 0h24v24H0z\" fill=\"none\"></path>\n        </svg>\n\n        <ng-content></ng-content>\n\n        <ng-container *ngIf=\"dragPreview\">\n            <div *cdkDragPreview>\n                <ng-container *ngTemplateOutlet=\"dragPreview\"></ng-container>\n            </div>\n        </ng-container>\n    </div>\n</div>\n", styles: [".cdk-drag{position:relative;cursor:move}.cdk-drag:hover{background-color:var(--nui-color-bg-light-hover,#f2f2f2);box-shadow:0 0 5px 0 var(--nui-shadow-color, rgba(17, 17, 17, .3))}.cdk-drag-with-handle{pointer-events:none}.cdk-drag-with-handle svg{pointer-events:all;position:absolute;top:10px;right:10px;color:#ccc;cursor:move;width:24px;height:24px}.cdk-drop-list-dragging{background-color:var(--nui-color-selected,rgba(0, 196, 210, .1));position:relative;pointer-events:none;box-shadow:0 0 5px 0 var(--nui-shadow-color, rgba(17, 17, 17, .3))}.cdk-drop-list-dragging .cdk-drag-placeholder{opacity:10%;display:initial}.cdk-drag-placeholder{display:none}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i2.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: i2.CdkDragPreview, selector: "ng-template[cdkDragPreview]", inputs: ["data", "matchSize"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: DraggableComponent, decorators: [{
            type: Component,
            args: [{ selector: "nui-draggable", template: "<div cdkDropList [cdkDropListConnectedTo]=\"[dropTarget.dropList]\">\n    <div\n        cdkDrag\n        [cdkDragData]=\"payload\"\n        [class.cdk-drag-with-handle]=\"dragHandle\"\n    >\n        <svg\n            *ngIf=\"dragHandle\"\n            cdkDragHandle\n            width=\"24px\"\n            fill=\"currentColor\"\n            viewBox=\"0 0 24 24\"\n        >\n            <path\n                d=\"M10 9h4V6h3l-5-5-5 5h3v3zm-1 1H6V7l-5 5 5 5v-3h3v-4zm14 2l-5-5v3h-3v4h3v3l5-5zm-9 3h-4v3H7l5 5 5-5h-3v-3z\"\n            ></path>\n            <path d=\"M0 0h24v24H0z\" fill=\"none\"></path>\n        </svg>\n\n        <ng-content></ng-content>\n\n        <ng-container *ngIf=\"dragPreview\">\n            <div *cdkDragPreview>\n                <ng-container *ngTemplateOutlet=\"dragPreview\"></ng-container>\n            </div>\n        </ng-container>\n    </div>\n</div>\n", styles: [".cdk-drag{position:relative;cursor:move}.cdk-drag:hover{background-color:var(--nui-color-bg-light-hover,#f2f2f2);box-shadow:0 0 5px 0 var(--nui-shadow-color, rgba(17, 17, 17, .3))}.cdk-drag-with-handle{pointer-events:none}.cdk-drag-with-handle svg{pointer-events:all;position:absolute;top:10px;right:10px;color:#ccc;cursor:move;width:24px;height:24px}.cdk-drop-list-dragging{background-color:var(--nui-color-selected,rgba(0, 196, 210, .1));position:relative;pointer-events:none;box-shadow:0 0 5px 0 var(--nui-shadow-color, rgba(17, 17, 17, .3))}.cdk-drop-list-dragging .cdk-drag-placeholder{opacity:10%;display:initial}.cdk-drag-placeholder{display:none}\n"] }]
        }], ctorParameters: function () { return []; }, propDecorators: { payload: [{
                type: Input
            }], dropTarget: [{
                type: Input
            }], dragHandle: [{
                type: Input
            }], dragPreview: [{
                type: Input
            }], dragStart: [{
                type: Output
            }], dragEnd: [{
                type: Output
            }], dropList: [{
                type: ViewChild,
                args: [CdkDropList, { static: true }]
            }], dragElement: [{
                type: ViewChild,
                args: [CdkDrag, { static: true }]
            }] } });
//# sourceMappingURL=data:application/json;base64, 