// #region Imports
import { CustomElement } from '../Controls/Components/Abstracts/CustomElement';
import { ViewPresenterController } from './ViewPresenterController';
// #endregion
/**
 * A abstract view.
 *
 * @public
 * @dynamic
 */
export class View extends CustomElement {
    // #region Fields
    _presenterController;
    // #endregion
    // #region Ctor
    /**
     * Constructs a new instance of the `View` class.
     *
     * @protected
     */
    constructor(presenter) {
        super();
        this._presenterController = new ViewPresenterController(this, presenter);
        this.presenter.isLoading.subscribe(() => this.requestUpdate());
    }
    // #endregion
    // #region Properties
    /**
     * Returns the presenter of the `View`
     *
     * @public
     * @readonly
     */
    get presenter() {
        return this._presenterController.presenter;
    }
}
//# sourceMappingURL=View.js.map