import { Maybe } from '@m4l/core';
import { RowKey } from '../../../types';
import { IGridConfigExtended, ViewMode } from '../../../contexts/DataGridContext/types';
/**
 * Gets the DataGrid view mode (table/cards).
 *
 * ## Persistence flow
 *
 * This function obtains viewMode following a precedence order:
 *
 * 1. **defaultConfig.viewMode** (Network cookies) - Highest priority
 * Configuration that comes from network cookies when the component mounts.
 * In production, this is the main source of persisted data.
 *
 * localStorage is not used.
 *
 * 2. **defaultViewMode** - Developer default value
 * Used when there is no configuration saved in network cookies.
 *
 * ## Relation with saveViewMode
 *
 * - When the user changes view, `saveViewMode` sends changes via the `onChangeConfig` callback
 * - On next load, that data comes back as `defaultConfig.viewMode`
 * @param id - Unique DataGrid identifier (API compatibility)
 * @param defaultConfig - User configuration from network cookies. Main source in production.
 * @param defaultViewMode - Developer default when no configuration is saved
 * @returns The viewMode to use, or undefined if none found
 * @example
 * // No network cookie config (uses defaultViewMode if provided)
 * const viewMode = getViewMode('my-grid', null, 'table');
 * @example
 * // With network cookie config (typical production case)
 * const viewMode = getViewMode('my-grid', { viewMode: 'cards' }, 'table');
 * @see saveViewMode - Complementary function to persist view mode
 */
export declare function getViewMode(_id: RowKey, defaultConfig: Maybe<IGridConfigExtended>, defaultViewMode?: ViewMode): ViewMode | undefined;
//# sourceMappingURL=getViewMode.d.ts.map