"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("@vived/core");
const core_2 = require("@vived/core");
const FramedScreen_1 = require("../../FramedScreen");
const Entities_1 = require("../Entities");
const UpdateTouchInputBound_1 = require("./UpdateTouchInputBound");
class MockTouchInput extends Entities_1.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 = (0, core_1.makeAppObjectRepo)();
    const appAO = appObjects.getOrCreate("App");
    const mockTouchInput = new MockTouchInput(appAO, Entities_1.TouchInputEntity.type);
    const containerAO = appObjects.getOrCreate("Canvas");
    const framedContainer = (0, FramedScreen_1.makeFramedScreenContainer)(containerAO);
    (0, FramedScreen_1.makeFramedContainerPM)(containerAO);
    const updateTouchHook = new UpdateTouchInputBound_1.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 core_2.Vector2(21, 35);
        expect(mockTouchInput.updateInputElementBounds).toHaveBeenCalled();
    });
});
//# sourceMappingURL=UpdateTouchInoutBound.test.js.map