import { AppObjectController } from "@vived/core";
import { MouseInputEntity, } from "../../../MouseInput";
import { BumpTransformScaleAboutPixelPointUC } from "../../UC";
export class RollScaleTransformMC extends AppObjectController {
    constructor(appObject) {
        super(appObject, RollScaleTransformMC.type);
        this.allow = (e) => {
            return true;
        };
        this.onWheel = (e) => {
            if (!this.allow(e))
                return;
            if (!this.bumpScaleUC) {
                return;
            }
            this.bumpScaleUC.bump(e.event.deltaY > 0 ? "OUT" : "IN", e.position);
        };
        this.bumpScaleUC = appObject.getComponent(BumpTransformScaleAboutPixelPointUC.type);
        if (!this.bumpScaleUC) {
            this.error("Controller has been added to an App Object that does not have BumpTransformScaleAboutPixelPointUC. Add one first.");
            return;
        }
        const mouseInput = MouseInputEntity.get(this.appObjects);
        if (mouseInput) {
            mouseInput.registerController(this);
        }
        else {
            this.error("Unable to find MouseInputEntity");
        }
    }
}
RollScaleTransformMC.type = "RollScaleTransformMC";
//# sourceMappingURL=RollScaleTransformMC.js.map