import { AcApContext } from '../../app'; import { AcEdCommand } from '../../editor'; /** * Global store for layer state snapshots to support LAYERP command. */ declare class AcApLayerPreviousStateManager { private previousSnapshot; /** * Captures the current layer state. * @param context - Active application context */ captureState(context: AcApContext): void; /** * Restores the previous layer state. * @param context - Active application context * @returns true if restoration was successful */ restorePreviousState(context: AcApContext): boolean; /** * Clears the previous state snapshot. */ clearPreviousState(): void; /** * Checks if a layer is locked. * @param layer - Layer table record */ private isLayerLocked; /** * Sets or clears the locked bit in layer flags. * @param layer - Layer table record * @param locked - Whether the layer should be locked */ private setLayerLocked; /** * Sets or clears the frozen bit in layer flags. * @param layer - Layer table record * @param frozen - Whether the layer should be frozen */ private setLayerFrozen; } /** * Exposes layer previous state manager for external use. */ export declare function getLayerPreviousStateManager(): AcApLayerPreviousStateManager; /** * AutoCAD-like `LAYERP` command. * * The command restores the layer state to what it was before the last * layer-modifying operation. This includes changes to layer on/off, * freeze/thaw, and lock/unlock states. * * Note: This is a simplified implementation that tracks one previous state. * A full implementation would maintain a stack of states. */ export declare class AcApLayerPCmd extends AcEdCommand { /** * Creates a write-enabled `LAYERP` command instance. */ constructor(); /** * Runs the restore-previous-layer-state workflow. * * @param context - Active application context used to update the current drawing. * @returns Resolves when the restoration is complete or if there is nothing to restore. */ 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; } /** * Captures layer state before executing a layer-modifying command. * Should be called before executing commands like LAYOFF, LAYFRZ, LAYLCK, etc. * * @param context - Active application context */ export declare function captureLayerStateBeforeOperation(context: AcApContext): void; export {}; //# sourceMappingURL=AcApLayerPCmd.d.ts.map