import { Injectable } from '@angular/core';
import { Subject } from 'rxjs';
import isEqual from 'lodash-es/isEqual';
import * as i0 from "@angular/core";
/**
 * Manager of layout metadata
 */
export class LayoutManager {
    constructor() {
        //######################### protected fields #########################
        /**
         * Current layout value
         */
        this._layout = null;
        /**
         * Used for emitting layout changes
         */
        this._layoutChange = new Subject();
    }
    //######################### public properties #########################
    /**
     * Gets current layout value
     */
    get layout() {
        return this._layout;
    }
    /**
     * Occurs when layout changes
     */
    get layoutChange() {
        return this._layoutChange.asObservable();
    }
    //######################### public methods #########################
    /**
     * Sets layout new value
     * @param layout - Value of layout that changed
     */
    setLayout(layout) {
        if (isEqual(this._layout, layout)) {
            return;
        }
        this._layout = layout;
        this._layoutChange.next();
    }
}
LayoutManager.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: LayoutManager, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
LayoutManager.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: LayoutManager });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.4", ngImport: i0, type: LayoutManager, decorators: [{
            type: Injectable
        }] });
//# sourceMappingURL=layoutManager.service.js.map