import { coerceBooleanProperty } from '@angular/cdk/coercion';
import { Directive, InjectionToken, Input, TemplateRef } from '@angular/core';
/**
 * Injection token that can be used to reference instances of `RDragPreview`. It serves as
 * alternative token to the actual `RDragPreview` class which could cause unnecessary
 * retention of the class and its directive metadata.
 */
export const R_DRAG_PREVIEW = new InjectionToken('RDragPreview');
/**
 * Element that will be used as a template for the preview
 * of a RDrag when it is being dragged.
 */
export class RDragPreview {
    constructor(templateRef) {
        this.templateRef = templateRef;
        this._matchSize = false;
    }
    /** Whether the preview should preserve the same size as the item that is being dragged. */
    get matchSize() { return this._matchSize; }
    set matchSize(value) { this._matchSize = coerceBooleanProperty(value); }
}
RDragPreview.decorators = [
    { type: Directive, args: [{
                selector: 'ng-template[rDragPreview]',
                providers: [{ provide: R_DRAG_PREVIEW, useExisting: RDragPreview }],
            },] }
];
RDragPreview.ctorParameters = () => [
    { type: TemplateRef }
];
RDragPreview.propDecorators = {
    data: [{ type: Input }],
    matchSize: [{ type: Input }]
};
//# sourceMappingURL=drag-preview.js.map