import { PropertyValues, TemplateResult } from 'lit'; import { BahtElement } from '../base.js'; export interface EditColumn { key: string; label: string; /** * `readonly` shows the value (a key set once: it is still a text input in * the `addable` row); the rest are inputs. Default `text`. */ type?: 'text' | 'number' | 'checkbox' | 'select' | 'readonly'; options?: { key: string; label: string; }[]; } export type EditRow = Record; /** * A table whose cells are edited in place (reference lists, catalog items, * groups). Each changed row shows Save; Save emits `baht-row-save` * `{ key, row }`, Remove emits `baht-row-delete` `{ key, row }`. With * `addable`, a blank first row emits `baht-row-add` `{ row }`. The host * persists and feeds the new `rows` back, which clears the edits. */ export declare class BahtEditTable extends BahtElement { columns: EditColumn[]; rows: EditRow[]; rowKey: string; addable: boolean; removable: boolean; label: string; /** Edited rows by key, until the host feeds new `rows`. */ private edits; private draft; willUpdate(changed: PropertyValues): void; private setDraft; private addDraft; private keyOf; private editCell; private inputValue; private cell; protected render(): TemplateResult; }