import { AppObjectController } from "@vived/core";
import { TouchInputEntity, } from "../../TouchController/Entities";
import { TryHideWithPickUC } from "../UCs/TryHideWithPickUC";
export class HideTC extends AppObjectController {
    get tryHideWithPick() {
        return this.getCachedSingleton(TryHideWithPickUC.type)
            ?.tryPixelPick;
    }
    get touchInput() {
        return this.getCachedSingleton(TouchInputEntity.type);
    }
    constructor(appObject) {
        super(appObject, HideTC.type);
        this.allow = (e) => {
            return true;
        };
        this.onTap = (e) => {
            if (!this.tryHideWithPick)
                return;
            if (!this.allow(e))
                return;
            this.tryHideWithPick(e.touchCenter);
        };
        this.touchInput?.registerController(this);
    }
}
HideTC.type = "HideTC";
//# sourceMappingURL=HideTC.js.map