import { AcApContext } from '../app';
import { AcEdCommand } from '../editor';
/**
 * Command-line HATCH command (no dialog), inspired by AutoCAD flow.
 *
 * Current scope:
 * - Build hatch boundaries from selected objects.
 * - Support command-line option branches (pattern/scale/angle/style/associative).
 * - No island-detection refinement beyond loop construction.
 */
export declare class AcApHatchCmd extends AcEdCommand {
    /**
     * Last-used command settings shared by all `AcApHatchCmd` instances.
     */
    private static _lastSettings;
    /**
     * Creates one HATCH command instance and marks it as write-mode only.
     */
    constructor();
    /**
     * Normalizes pattern name input.
     *
     * @param value Raw user-entered pattern name.
     * @returns Trimmed name, or `ANSI31` when input is empty.
     */
    private normalizePatternName;
    /**
     * Converts hatch style enum to command keyword string.
     *
     * @param style Hatch style enum value.
     * @returns Command keyword name used by keyword prompts.
     */
    private styleToKeyword;
    /**
     * Converts command keyword string to hatch style enum.
     *
     * @param keyword Keyword returned by prompt API.
     * @returns Matching hatch style enum, defaulting to `Normal`.
     */
    private keywordToStyle;
    /**
     * Converts a closed polyline entity into a boundary-edge sequence.
     *
     * The function keeps arc segments by reading per-vertex bulge values.
     * If runtime bulge data is unavailable, vertices fall back to straight edges.
     *
     * @param entity Input polyline entity.
     * @returns Ordered boundary edges or empty array if not hatchable.
     */
    private buildEdgesFromPolyline;
    /**
     * Converts a supported boundary entity into one or more boundary edges.
     *
     * Supported entities:
     * - `AcDbPolyline` (closed)
     * - `AcDbCircle`
     * - `AcDbArc` (closed only)
     * - `AcDbLine`
     *
     * @param entity Input entity from model space.
     * @returns Edge list consumable by loop builder.
     */
    private buildEdgesFromEntity;
    /**
     * Builds closed loops from explicit object ids.
     *
     * @param context Active command context.
     * @param ids Object ids selected by the user.
     * @returns Closed loops ready for hatch creation.
     */
    private collectLoopsFromIds;
    /**
     * Scans model space and builds closed loops from all supported boundaries.
     *
     * This is used by pick-points mode so a seed point can be resolved against
     * all potential loops in the drawing.
     *
     * @param context Active command context.
     * @returns Closed loops derived from all hatchable entities.
     */
    private collectLoopsFromAllBoundaries;
    /**
     * Builds best-effort closed loops from boundary edges.
     *
     * The loop solver is retried with increasing tolerance values and the best
     * (largest) closed-loop result set is returned.
     *
     * @param edges Input boundary edge set.
     * @returns Closed loops produced by the best tolerance attempt.
     */
    private buildLoopsFromEdges;
    /**
     * Calculates polygon signed area using the shoelace formula.
     *
     * @param points Polygon vertices.
     * @returns Signed area; positive/negative sign depends on winding direction.
     */
    private signedArea;
    /**
     * Tests whether one point lies on a finite segment within a tolerance.
     *
     * @param px Test point X.
     * @param py Test point Y.
     * @param ax Segment start X.
     * @param ay Segment start Y.
     * @param bx Segment end X.
     * @param by Segment end Y.
     * @param tolerance Distance tolerance.
     * @returns `true` if point is on segment; otherwise `false`.
     */
    private isPointOnSegment;
    /**
     * Determines whether a point is inside (or on boundary of) a polygon.
     *
     * Boundary points are treated as inside to keep seed-point behavior stable
     * near loop edges.
     *
     * @param point Test point.
     * @param polygon Polygon vertices.
     * @returns `true` when inside or on boundary.
     */
    private isPointInPolygon;
    /**
     * Builds loop metadata and parent/child containment relationships.
     *
     * @param loops Candidate closed loops.
     * @returns Loop info array with area and hierarchy metadata.
     */
    private buildLoopInfos;
    /**
     * Resolves which loops should be used for one pick-point seed.
     *
     * Strategy:
     * - Find the smallest containing loop as target.
     * - Include direct children as holes unless style is `Ignore`.
     *
     * @param point Seed point selected by user.
     * @param loops Candidate loops.
     * @returns Ordered loop set to append into one hatch entity.
     */
    private resolveLoopsForPickPoint;
    /**
     * Creates and appends one hatch entity from computed loops.
     *
     * @param context Active command context.
     * @param loops Boundary loops to be added to the hatch.
     * @returns `true` when hatch entity was created; otherwise `false`.
     */
    private appendHatch;
    /**
     * Prompts for pattern name and updates persisted command settings.
     *
     * @returns Promise resolved when prompt flow completes.
     */
    private promptPatternName;
    /**
     * Prompts for pattern scale and updates persisted command settings.
     *
     * @returns Promise resolved when prompt flow completes.
     */
    private promptPatternScale;
    /**
     * Prompts for pattern angle (degrees) and updates persisted settings.
     *
     * @returns Promise resolved when prompt flow completes.
     */
    private promptPatternAngle;
    /**
     * Prompts for hatch style (`Normal` / `Outer` / `Ignore`).
     *
     * @returns Promise resolved when prompt flow completes.
     */
    private promptStyle;
    /**
     * Prompts for associative mode switch (`Yes` / `No`).
     *
     * @returns Promise resolved when prompt flow completes.
     */
    private promptAssociative;
    /**
     * Executes object-selection branch of HATCH.
     *
     * @param context Active command context.
     * @returns `true` if a hatch was created from selected objects.
     */
    private doSelectObjects;
    /**
     * Executes pick-points branch of HATCH.
     *
     * The user can place multiple seed points. Each accepted point attempts
     * one hatch creation, and pressing Enter terminates this branch.
     *
     * @param context Active command context.
     * @returns `true` if at least one hatch was created.
     */
    private doPickPoints;
    /**
     * Runs the interactive command-line HATCH workflow.
     *
     * Main loop behavior:
     * - Direct entity pick: hatch from picked boundary object.
     * - Keyword branches: pick-points, select-objects, or option editing.
     * - Enter/Cancel: exits command.
     *
     * @param context Active command context.
     * @returns Promise resolved when command ends.
     */
    execute(context: AcApContext): Promise<void>;
}
//# sourceMappingURL=AcApHatchCmd.d.ts.map