import { AppObjectUC } from "@vived/core";
import { FramedContainerPM } from "../../FramedScreen";
import { TouchInputEntity } from "../Entities";
export class UpdateTouchInputBoundUC extends AppObjectUC {
    constructor(appObject) {
        super(appObject, UpdateTouchInputBoundUC.type);
        this.onRenderCanvasChange = () => {
            this.touchInput?.updateInputElementBounds();
        };
        this.touchInput = TouchInputEntity.get(appObject.appObjectRepo);
        if (!this.touchInput) {
            this.warn("Unable to find TouchInputEntity");
            return;
        }
        const pm = appObject.getComponent(FramedContainerPM.type);
        if (!pm) {
            this.warn("Unable to find FramedContainerPM");
            return;
        }
        pm.addView(this.onRenderCanvasChange);
        this.onRenderCanvasChange();
    }
}
UpdateTouchInputBoundUC.type = "UpdateTouchInputBoundUC";
//# sourceMappingURL=UpdateTouchInputBound.js.map