/**
 * Holds a set of {@link Ability} instances and runs the activation +
 * preemption + queueing policy:
 *
 *   1. If an ability is active, tick it first.
 *      - If its tick returns false → it's done. Falls through to step 2
 *        in the SAME tick (no wasted frame).
 *
 *   2. If a queued ability exists (from a previous tick that was blocked),
 *      check its canActivate() again. If still wants in → activate.
 *
 *   3. If no ability is active, poll all abilities in DESCENDING priority.
 *      First that canActivate() becomes active.
 *
 *   4. If an active ability is still running but a higher-priority one
 *      wants in: check the active one's canInterrupt(). If yes → preempt
 *      now. If no → queue the higher-priority candidate; it will re-check
 *      every tick until the current ability releases (or canInterrupt
 *      flips to true).
 *
 * Returns whether base-locomotion should run this tick (true iff no
 * ability owns motion).
 *
 * @author Alex Goldring
 * @copyright Company Named Limited (c) 2026
 */
export class AbilitySet {
    /**
     * Registered abilities. Order does not matter — sorted by priority
     * on demand when polling. Set is small (typically <10) so we don't
     * pre-sort.
     * @type {Ability[]}
     */
    abilities: Ability[];
    /**
     * Currently-active ability, or null if base locomotion is running.
     * @type {Ability|null}
     */
    active: Ability | null;
    /**
     * Ability waiting for the current one to release. Cleared when it
     * activates OR when its canActivate() returns false on re-check
     * (the conditions that wanted it might have passed).
     * @type {Ability|null}
     */
    queued: Ability | null;
    /**
     * Add an ability.
     * @param {Ability} ability
     */
    add(ability: Ability): void;
    /**
     * Remove an ability if present. If it's currently active or queued,
     * deactivates / clears it first.
     * @param {Ability} ability
     */
    remove(ability: Ability): void;
    /**
     * Execute one tick. Returns true if base locomotion should run this
     * fixed step (no ability owns motion).
     *
     * @param {*} controller
     * @param {*} runtime
     * @param {*} bodyTransform
     * @param {*} sensors
     * @param {number} dt
     * @param {*} [system] FirstPersonPlayerControllerSystem instance,
     *                     passed through to ability.tick() so abilities
     *                     can delegate to shared helpers.
     * @returns {boolean} true = run base locomotion; false = ability owned
     */
    tick(controller: any, runtime: any, bodyTransform: any, sensors: any, dt: number, system?: any): boolean;
    /**
     * @private
     */
    private _findHighestPriorityActivatable;
    /**
     * @private
     */
    private _activate;
    /**
     * @private
     */
    private _deactivate;
}
//# sourceMappingURL=AbilitySet.d.ts.map