import { AcDbObjectId, AcGeBox2d } from '@mlightcad/data-model'; /** One counted block instance (top-level or nested). */ export interface MlCountListInstance { /** Object ID used for selection/highlight (parent INSERT for nested). */ id: AcDbObjectId; /** Referenced block definition name. */ blockName: string; /** WCS insertion point used for area filter / zoom. */ position: { x: number; y: number; z: number; }; isNested: boolean; } /** Aggregated count row shown in the Count palette. */ export interface MlCountListGroup { key: string; blockName: string; label: string; count: number; instances: MlCountListInstance[]; } /** Optional rectangular count area in WCS. */ export type MlCountListArea = AcGeBox2d | null; /** * Collects countable block instances from model space, including nested * inserts inside referenced block definitions (AutoCAD Count behavior). */ export declare function collectCountListInstances(area?: MlCountListArea): MlCountListInstance[]; /** Aggregates instances into Count palette rows by block name. */ export declare function buildCountListGroups(instances: MlCountListInstance[], search?: string): MlCountListGroup[]; /** Selects the given object IDs in the active view. */ export declare function selectCountListInstances(ids: AcDbObjectId[]): void; /** * Zooms the view to the geometric extents of the given object IDs. * Falls back to insertion points when extents are empty. */ export declare function zoomToCountListInstances(ids: AcDbObjectId[], fallbackPositions?: Array<{ x: number; y: number; }>): boolean; /** * Prompts the user for a rectangular count area (or Entire via keyword). * Returns the selected box, `null` for entire drawing, or `undefined` if cancelled. */ export declare function promptCountListArea(firstCornerMessage: string, secondCornerMessage: string): Promise; /** Convenience: rebuild groups from current drawing state. */ export declare function getCountListGroups(search?: string, area?: MlCountListArea): MlCountListGroup[]; //# sourceMappingURL=useCountList.d.ts.map