import { AcApContext } from '../../app'; import { AcEdCommand } from '../../editor'; /** * AutoCAD-like `LAYDEL` command. * * Supported workflows: * - Pick an entity to delete its layer and every object on that layer. * - Switch to the `Name` branch to delete a layer by name. * - Use `Undo` to restore the most recently deleted layer in the current * command session. */ export declare class AcApLayerDelCmd extends AcEdCommand { private _history; /** * Creates a write-enabled `LAYDEL` command instance. */ constructor(); /** * Runs the interactive layer deletion workflow until the user cancels. * * The command supports both entity-based and name-based deletion paths and * keeps an in-memory undo history for the current command session only. * * @param context - Active application context used to inspect and mutate the drawing. * @returns Resolves when the command loop ends. */ execute(context: AcApContext): Promise; /** * Sends a localized status message through the command-line output. * * @param message - Text to display to the user. * @param type - Visual severity mapped to command-line message styles. */ private notify; /** * Registers a localized keyword on an entity or string prompt. * * @param prompt - Prompt instance that should expose the keyword. * @param keyword - I18n keyword identifier under `jig.laydel.keywords`. */ private addKeyword; /** * Prompts for the main `LAYDEL` action. * * Users can either pick an entity to infer the target layer or switch to a * keyword branch such as `Name` or `Undo`. * * @returns Resolved action, or `undefined` when the prompt is canceled. */ private promptMainAction; /** * Runs the layer-name branch until the user exits that submenu. * * @param context - Active application context used to list, delete, or restore layers. * @returns Resolves when the name submenu ends. */ private runNameBranch; /** * Prompts for a layer name or one of the name-branch keywords. * * @returns Resolved name action, or `undefined` when canceled or left blank. */ private promptLayerNameAction; /** * Prints a snapshot of all current layers to the console and notifies the UI. * * @param context - Active application context providing access to the layer table. */ private listLayers; /** * Resolves the selected entity's layer name and delegates to layer deletion by name. * * @param context - Active application context containing the current database. * @param objectId - Identifier of the entity selected by the user. */ private deleteLayerByEntity; /** * Deletes a layer and every entity currently assigned to it. * * The removed layer record and cloned entities are stored in `_history` so * that `Undo` can reconstruct the previous state during the same run. * * @param context - Active application context containing the drawing to mutate. * @param layerName - Name of the layer to remove. */ private deleteLayerByName; /** * Captures clones of every entity that belongs to the specified layer. * * Each snapshot also records the owning block record so undo can restore the * entities to the correct container. * * @param context - Active application context containing the current database. * @param layerName - Layer whose entities should be collected. * @returns Cloned entity snapshots grouped later by owner during deletion or undo. */ private collectLayerEntities; /** * Removes the captured entities from their owning block records. * * @param context - Active application context containing the current database. * @param deletedEntities - Entity snapshots to remove from the drawing. */ private removeLayerEntities; /** * Restores the most recently deleted layer and its entities. * * @param context - Active application context containing the current database and view. */ private runUndo; } //# sourceMappingURL=AcApLayerDelCmd.d.ts.map