"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SetViewInXRUC = void 0;
exports.makeSetViewInXRUC = makeSetViewInXRUC;
const core_1 = require("@vived/core");
const Dispatcher_1 = require("../../Dispatcher");
class SetViewInXRUC extends core_1.AppObjectUC {
}
exports.SetViewInXRUC = SetViewInXRUC;
SetViewInXRUC.type = "SetViewInXRUC";
SetViewInXRUC.get = (appObjects) => (0, core_1.getSingletonComponent)(SetViewInXRUC.type, appObjects);
function makeSetViewInXRUC(appObject) {
    return new SetViewInXRUCImp(appObject);
}
class SetViewInXRUCImp extends SetViewInXRUC {
    get dispatchStartZSpace() {
        return this.getCachedSingleton(Dispatcher_1.DispatchStartZSpaceUC.type);
    }
    constructor(appObject) {
        super(appObject, SetViewInXRUC.type);
        this.setViewInXR = () => {
            if (this.dispatchStartZSpace) {
                this.dispatchStartZSpace.doDispatch();
            }
            else {
                this.warn("Missing necessary entities");
            }
        };
    }
}
//# sourceMappingURL=SetInXRUC.js.map