import type { ColumnDef } from '../../types/column.types';
/**
* The checkbox element a `boolean` cell shows, and the rule for when it is
* interactive.
*
* A **leaf module**: it imports nothing but types. That matters structurally —
* `built-in/boolean.ts` needs this, and it is reached through
* `registry.ts → createDefaultRenderers()`, which `renderer-resolver.ts`
* imports, which `cell-renderer.ts` imports. Leaving these helpers in
* `cell-renderer.ts` would close that loop and, because the registry singleton
* is constructed at module scope, turn it into a temporal-dead-zone crash at
* startup rather than a lazy failure.
*
* @packageDocumentation
*/
/**
* Marker class on the `` a `boolean` column renders.
*
* Deliberately **not** `.pg-checkbox` — that class means "row-selection
* checkbox" to `BodyRenderer`'s delegated click handler and to
* `updateRowSelection`, both of which would otherwise mistake a data cell's
* checkbox for the selection one and toggle the wrong thing.
*/
export declare const BOOLEAN_CELL_CHECKBOX_CLASS = "pg-cell-checkbox";
/**
* `true` when a `boolean` cell's checkbox should accept input.
*
* A column that is not editable, is locked, or sits in a grid with editing
* switched off renders its checkbox disabled — the value is still shown, it
* just cannot be changed by clicking it.
*
* A **predicate** `editable` is treated as enabled here, because this runs per
* cell during rendering and has no row to evaluate it against. That is not a
* hole: the toggle itself goes through `EditorManager.commitValue`, which
* resolves the predicate against the real row and refuses the write if it says
* no. Rendering optimistically and enforcing at commit is the right way round —
* the alternative disables every checkbox on a column whose editability happens
* to be dynamic.
*
* @param colDef - Column the cell belongs to.
* @param editingEnabled - Grid-level editing switch; `true` when unspecified.
*/
export declare function isBooleanCellEditable(colDef: ColumnDef, editingEnabled?: boolean): boolean;
/**
* Builds the checkbox a `boolean` cell displays.
*
* A real `` rather than a tick glyph, so the cell shows
* both states (an unchecked box reads as "false"; an empty cell reads as "no
* data") and so an editable column is directly toggleable without opening an
* editor first. The input carries no listeners of its own — `GridCore` handles
* the toggle through one delegated listener on the grid root, which is what
* keeps a viewport of thousands of boolean cells free of per-cell handlers.
*
* @param value - Logical cell value; coerced with `!!`.
* @param colDef - Column the cell belongs to.
* @param editingEnabled - Grid-level editing switch; `true` when unspecified.
*/
export declare function buildBooleanCellCheckbox(value: unknown, colDef: ColumnDef, editingEnabled?: boolean): HTMLInputElement;
/**
* Re-syncs an existing boolean checkbox to a new value.
*
* The in-place counterpart to {@link buildBooleanCellCheckbox}: rebuilding the
* cell would replace the `` the user may be mid-click on.
*
* @returns `true` when the element was found and updated.
*/
export declare function syncBooleanCellCheckbox(cellEl: HTMLElement, value: unknown, colDef: ColumnDef, editingEnabled?: boolean): boolean;
//# sourceMappingURL=checkbox-element.d.ts.map