/**
 * Ledge-grab ability — snap to a forward ledge while descending and hang
 * from it until the player chooses (or is forced) to release.
 *
 * Activation:
 *   - `sensors.ledgeAhead.hit` (a forward+up obstacle probe found a grab-
 *     able edge — typically the same probe mantle uses).
 *   - `runtime.velocityY <= 0` — the player is descending or static. We
 *     don't auto-catch ledges on the way UP — that would feel like the
 *     world is grabbing the player mid-jump.
 *   - `state.airborneTime >= minAirborneTime` — leaves a small window
 *     after takeoff where ledge-grab can't fire, even if the player is
 *     instantly at apex (which would otherwise satisfy `velocityY <= 0`).
 *   - Forward intent (`intent.move.y > 0.1`) — the player must be
 *     committing into the ledge. Walking backwards off an edge shouldn't
 *     auto-catch the lip.
 *
 * Behaviour:
 *   - Body position snaps to a "hang from edge" pose: at the ledge edge
 *     X/Z (with a small back-offset so the body is pulled against the
 *     wall below), and Y offset down by ~bodyHeight so the hands grip
 *     the edge with the body suspended below.
 *   - Velocity is zeroed each tick — the body is parked.
 *   - Exertion rises at `cfg.exertionRiseRate` per second, scaled by
 *     mass. Climbing fatigue: hang too long and the next exit is
 *     forced (a slip).
 *   - Grounded stays false (the player is hanging in air).
 *
 * Exit:
 *   - Jump pressed (rising edge) → mantle-up. Release with a small
 *     upward velocity so mantle's ledgeAhead probe still hits next
 *     tick; mantle (priority 30) then takes over and animates the
 *     climb-onto-surface path.
 *   - Back-intent (`intent.move.y < -0.1`) → drop. Release with zero
 *     velocity; the player falls under base gravity.
 *   - Crouch pressed → drop. Same as back-intent.
 *   - Exertion saturates (`>= 1`) → slip. Release with zero velocity.
 *   - `sensors.ledgeAhead.hit` becomes false → shuffled off the edge.
 *     Release with zero velocity.
 *
 * Priority 40 — above mantle (30), below wall-run (50). Mantle CAN'T
 * preempt an active ledge-grab — that's the point of placing ledge
 * higher. Otherwise mantle would fire mid-hang and snap the body away.
 * Wall-run and wall-jump can preempt — but in practice they need lateral
 * walls + speed (wall-run) or a jump press near a side wall (wall-jump),
 * conditions which rarely hold while hanging.
 *
 * @author Alex Goldring
 * @copyright Company Named Limited (c) 2026
 */
export class LedgeGrab extends Ability {
    /** @private Wall-face anchor (x,z), the face's outward normal (x,z),
     *  and the top-edge height (y) — captured at onActivate. The hang pose
     *  is built from the WALL, not from the (possibly oblique) body
     *  facing, so it stays just outside the wall at any approach angle. */
    private _anchorX;
    _anchorZ: number;
    _nx: number;
    _nz: number;
    _edgeY: number;
    canActivate(controller: any, runtime: any, sensors: any): boolean;
    onActivate(controller: any, runtime: any): void;
    canInterrupt(): boolean;
    tick(controller: any, runtime: any, bodyTransform: any, dt: any, _system: any): boolean;
}
import { Ability } from "./Ability.js";
//# sourceMappingURL=LedgeGrab.d.ts.map