import { AppObjectUC, getSingletonComponent, } from "@vived/core";
import { DispatchStartZSpaceUC } from "../../Dispatcher";
export class SetViewInXRUC extends AppObjectUC {
}
SetViewInXRUC.type = "SetViewInXRUC";
SetViewInXRUC.get = (appObjects) => getSingletonComponent(SetViewInXRUC.type, appObjects);
export function makeSetViewInXRUC(appObject) {
    return new SetViewInXRUCImp(appObject);
}
class SetViewInXRUCImp extends SetViewInXRUC {
    get dispatchStartZSpace() {
        return this.getCachedSingleton(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