import type { AnyColumn, ChartDataOptions, PivotTableDataOptions } from '../../../domains/visualizations/core/chart-data-options/types';
import type { DataOptionLocation } from '../../../types';
/**
 * Sets a data option in the dataOptions structure at the specified location.
 *
 * This function creates a new dataOptions object with the value updated at the specified location,
 * following immutable patterns. The original dataOptions object is not modified.
 *
 * The function handles both array-based locations (e.g., `category`, `rows`, `values`)
 * and single-value locations (e.g., `x`, `y`, `date`). For array-based locations,
 * the `dataOptionIndex` specifies which item to update (defaults to 0 if not provided).
 *
 * @param value - The new value to set at the specified location
 * @param location - The location where to set the data option
 * @param dataOptions - The data options structure to update (e.g., from various chart types or pivot table)
 * @returns A new dataOptions object with the updated value, or the original object if the location is invalid
 *
 * @example
 * ```typescript
 * const dataOptions = {
 *   category: [DM.Commerce.Date.Years, DM.Category.Category],
 *   value: [DM.Commerce.Revenue],
 *   breakBy: [],
 * };
 *
 * // Set first category
 * const updatedDataOptions = setDataOptionAtLocation(DM.Commerce.Date.Months, { dataOptionName: 'category', dataOptionIndex: 0 }, dataOptions);
 * // Result: { category: [DM.Commerce.Date.Months, DM.Category.Category], ... }
 *
 * // Set single value (index defaults to 0)
 * const scatterDataOptions = {
 *   x: DM.Category.Category,
 *   y: DM.Commerce.Revenue,
 * };
 * const updatedScatterDataOptions = setDataOptionAtLocation(DM.Commerce.Cost, { dataOptionName: 'y' }, scatterDataOptions);
 * // Result: { x: DM.Category.Category, y: DM.Commerce.Cost }
 * ```
 */
export declare function setDataOptionAtLocation<T extends ChartDataOptions | PivotTableDataOptions>(value: AnyColumn, location: DataOptionLocation, dataOptions: T): T;
