/**
 * The InteractorHandler manages the interactors. For efficiency, interactors may be
 * stored persistently in an interactor list.
 */
var InteractorHandler = /** @class */ (function () {
    function InteractorHandler() {
    }
    /**
     * Looks for interactor for the given component and returns true/false.
     *
     * @param componentId The id of the component.
     *
     * @returns True if an interactor exists, else false.
     */
    InteractorHandler.Contains = function (componentId) {
        for (var tI = 0; tI < InteractorHandler.InteractorList.length; tI++) {
            if (InteractorHandler.InteractorList[tI].GetComponentId() ===
                componentId) {
                return true;
            }
        }
        return false;
    };
    /**
     * Gets the interactor for the given component, or null if there isn't one.
     *
     * @param componentId The id of the component.
     *
     * @returns The interactor or null.
     */
    InteractorHandler.GetInteractor = function (componentId) {
        for (var tI = 0; tI < InteractorHandler.InteractorList.length; tI++) {
            if (InteractorHandler.InteractorList[tI].GetComponentId() ===
                componentId) {
                return InteractorHandler.InteractorList[tI];
            }
        }
        return null;
    };
    /** The currently active interactor, or null. */
    InteractorHandler.CurrentInteractor = null;
    /** The list of instantiated interactors. */
    InteractorHandler.InteractorList = new Array();
    return InteractorHandler;
}());
export { InteractorHandler };
