import { Injectable } from '@angular/core';
import { Subject } from 'rxjs';
import * as i0 from "@angular/core";
/**
 * Service that holds information whether is currently drag active
 */
export class DragActiveService {
    constructor() {
        //######################### private fields #########################
        /**
         * Current dragging value
         */
        this._dragging = false;
        /**
         * Used for emitting dragging changes
         */
        this._draggingChange = new Subject();
    }
    //######################### public properties #########################
    /**
     * Gets current dragging value
     */
    get dragging() {
        return this._dragging;
    }
    /**
     * Occurs when dragging changes
     */
    get draggingChange() {
        return this._draggingChange.asObservable();
    }
    //######################### public methods #########################
    /**
     * Sets dragging new value
     * @param dragging - Value of dragging that changed
     */
    setDragging(dragging) {
        if (this._dragging == dragging) {
            return;
        }
        this._dragging = dragging;
        this._draggingChange.next();
    }
}
DragActiveService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DragActiveService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
DragActiveService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DragActiveService });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: DragActiveService, decorators: [{
            type: Injectable
        }] });
//# sourceMappingURL=dragActive.service.js.map