/**
 * Cell types for mutation tracking and cell-diff formatting.
 *
 * TODO: Indirect change tracking — detect formula dependents that recalculate
 * when a direct cell is mutated. Currently all changes are marked as direct.
 */
/** Excel error strings returned by @mog-sdk/node (0.1.12+). */
export const EXCEL_ERRORS = new Set([
    '#DIV/0!',
    '#NAME?',
    '#VALUE!',
    '#REF!',
    '#N/A',
    '#NULL!',
    '#NUM!',
    '#GETTING_DATA'
]);
/** Returns true if a value is an Excel error string. */
export function isExcelError(val) {
    return (typeof val === 'string' && (EXCEL_ERRORS.has(val) || (val.startsWith('#') && val.endsWith('!'))));
}
/**
 * Returns true if a cell should appear in the diff summary.
 * Excludes string/label-only cells (no formula, value is a string) since
 * the LLM can see those in the code. Keeps formulas, numbers, booleans,
 * and error values.
 */
export function shouldIncludeCell(cell) {
    // Always show formula cells
    if (cell.formula)
        return true;
    // Hide pure label→label changes (LLM can see these in code)
    if (typeof cell.value === 'string' && typeof cell.oldValue === 'string')
        return false;
    // Show numeric and boolean transitions
    if (typeof cell.value === 'number' || typeof cell.oldValue === 'number')
        return true;
    if (typeof cell.value === 'boolean' || typeof cell.oldValue === 'boolean')
        return true;
    // Show error values (#REF!, #DIV/0!, etc.)
    if (isExcelError(cell.value))
        return true;
    return false;
}
//# sourceMappingURL=types.js.map