import { makeAppObjectRepo } from "@vived/core";
import { Vector2 } from "@vived/core";
import { makeFramedContainerPM, makeFramedScreenContainer, } from "../../FramedScreen";
import { TouchInputEntity } from "../Entities";
import { UpdateTouchInputBoundUC } from "./UpdateTouchInputBound";
class MockTouchInput extends TouchInputEntity {
    constructor() {
        super(...arguments);
        this.setEventElement = jest.fn();
        this.clearInputElement = jest.fn();
        this.updateInputElementBounds = jest.fn();
        this.registerController = jest.fn();
        this.removeController = jest.fn();
    }
    get eventElement() {
        throw new Error("Method not implemented.");
    }
}
function makeTestRig() {
    const appObjects = makeAppObjectRepo();
    const appAO = appObjects.getOrCreate("App");
    const mockTouchInput = new MockTouchInput(appAO, TouchInputEntity.type);
    const containerAO = appObjects.getOrCreate("Canvas");
    const framedContainer = makeFramedScreenContainer(containerAO);
    makeFramedContainerPM(containerAO);
    const updateTouchHook = new UpdateTouchInputBoundUC(containerAO);
    return { updateTouchHook, mockTouchInput, framedContainer };
}
describe("Update Touch Input Bounds UC Hook", () => {
    it("Calls update input element when the framed container notifies", () => {
        const { mockTouchInput, framedContainer } = makeTestRig();
        framedContainer.position = new Vector2(21, 35);
        expect(mockTouchInput.updateInputElementBounds).toHaveBeenCalled();
    });
});
//# sourceMappingURL=UpdateTouchInoutBound.test.js.map