import { AcApDocManager } from '@mlightcad/cad-simple-viewer'; import type { AcUiI18n } from '../i18n'; /** Sort direction for the layer name column. */ export type AcUiLayerNameSortOrder = 'none' | 'asc' | 'desc'; /** Constructor options for {@link AcUiLayerListView}. */ export interface AcUiLayerListViewOptions { /** Document manager used to resolve the active document's layer store. */ editor: AcApDocManager; /** i18n helper for panel labels. */ i18n: AcUiI18n; /** Viewer host used for theme CSS variables and color picker. */ host: HTMLElement; /** When true, renders a title header above the table. */ showHeader?: boolean; } /** * Reusable layer table view (name, visibility, color). * * Used in dock panel tabs (for example the layers tab). */ export declare class AcUiLayerListView { /** Root element containing optional header and table. */ readonly element: HTMLDivElement; /** Layer table body receiving row nodes. */ private tbody; /** Header checkbox toggling all layers on/off. */ private masterCheckbox; /** Panel title label element when {@link showHeader} is true. */ private titleEl?; /** Name column header cell. */ private nameHeaderEl; /** Name column header label text. */ private nameHeaderLabelEl; /** Name column sort indicator. */ private nameSortIndicatorEl; /** On column header label. */ private onLabelEl; /** Color column header cell. */ private colorHeaderEl; /** Document manager whose active document supplies layer data. */ private readonly editor; /** Layer store currently subscribed for change notifications. */ private subscribedLayerStore?; /** i18n helper for labels and toasts. */ private readonly i18n; /** Viewer host reference. */ private readonly host; /** Whether a title header is rendered above the table. */ private readonly showHeader; /** Current sort direction for the name column. */ private nameSortOrder; /** * @param options - Editor, i18n, host, and display options. */ constructor(options: AcUiLayerListViewOptions); /** Layer store for the active document, when one is open. */ private get activeLayerStore(); /** Subscribes to the active document's layer store after document switches. */ private bindToActiveDocument; private handleDocumentActivated; /** Updates header labels after a locale change. */ refreshLocale(): void; /** Cycles name-column sort: none → ascending → descending → none. */ private cycleNameSortOrder; /** Syncs name-header aria/title/indicator with {@link nameSortOrder}. */ private updateNameSortHeader; /** * Returns layers ordered by the current name sort setting. * * @param layers - Layer snapshots from the store. */ private getSortedLayers; /** Removes event listeners. Does not remove DOM (caller owns mount point). */ destroy(): void; /** Rebuilds table body rows when {@link AcApLayerStore} data changes. */ private handleLayersChanged; /** Rebuilds table body rows from {@link AcApLayerStore} data. */ private renderRows; /** * Creates a table row for one layer. * * @param layer - Layer snapshot to display. * @param currentLayer - Name of the current drawing layer (`CLAYER`). */ private createRow; /** * Shows a short-lived toast message at the top of the viewport. * * @param message - Text to display. */ private showToast; } //# sourceMappingURL=AcUiLayerListView.d.ts.map