import type { ChartModel } from "../chart-model/chart-model.js";
import type { HeatChartDataSortingKinds, SerialChartDataSortingKinds } from "../interfaces/common.js";
import type { WithColorMatch } from "../properties/color-match.js";
import type { WithRotatedState } from "../properties/rotated-state.js";
import type { WithDataLabelsVisibility } from "../properties/data-labels/data-labels-visibility.js";
import type { WithDataLabelsSymbol } from "../properties/data-labels/data-labels-symbol.js";
import type { WithAxisLabelsSymbol } from "../properties/axes/axis-labels-symbol.js";
import type { WithAxisLinesSymbol } from "../properties/axes/axis-lines-symbol.js";
import type { WithXBounds } from "../properties/axes/x-axis/x-bounds.js";
import type { WithXAxisLabelsVisibility } from "../properties/axes/x-axis/x-axis-labels-visibility.js";
import type { WithXAxisTitleSymbol } from "../properties/axes/x-axis/x-axis-title-symbol.js";
import type { WithXAxisTitleText } from "../properties/axes/x-axis/x-axis-title-text.js";
import type { WithXAxisTitleVisibility } from "../properties/axes/x-axis/x-axis-title-visibility.js";
import type { WithGenerateXAxisTitle } from "../properties/axes/x-axis/generate-x-axis-title.js";
import type { WebChartStatisticType, WebChartStackedKinds } from "../../spec/chart-object-literals.js";
import type { WebChartDataFilters, WebChartNullCategory } from "../../spec/web-chart.js";
import type { Color } from "../../spec/rest-js-types.js";
import type { ModelWithMultiAxes } from "../mixins/model-with-multi-axes.js";
import type { ModelWithLegend } from "../mixins/model-with-legend.js";
import type { ModelWithTooltips } from "../mixins/model-with-tooltips.js";
import type { ModelWithXGuides } from "../mixins/model-with-x-guides.js";
import type { ModelWithYGuides } from "../mixins/model-with-y-guides.js";
import type { ModelWithTemporalBinning } from "../mixins/model-with-temporal-binning.js";

export abstract class SerialChartModel extends SerialChartModelSuperclass {
  /** The aggregation type for the chart. */
  accessor aggregationType: WebChartStatisticType;
  /**
   * Whether temporal binning is enabled for all series in the config.
   *
   * **Note:** Setting this prop removes any existing temporal binning settings if `value` is set to `false`.
   */
  accessor binTemporalData: boolean;
  /**
   * The null category configuration of the chart.
   *
   * The following to be set on the model for the null category to be applied:
   * - `fetchNULLValues` to be set to `true` on the model.
   * - `colorMatch` to be set to `false` on the model
   */
  accessor nullCategory: WebChartNullCategory | undefined;
  /** The numeric fields array for the chart. */
  get numericFields(): string[];
  set numericFields(value: string[] | string);
  /** The list of values for custom sort. */
  accessor orderByList: string[];
  /** The split-by field for the chart. */
  accessor splitByField: string;
  /**
   * How the bars (lines) should be placed when multiple series are rendered in the same chart, say when "split by" operation is executed on any field or
   * when multiple attributes/fields corresponding to the same set of classes are to be visualized.
   *
   * **Note**: Currently this property is only used for bar charts and line charts.
   */
  accessor stackedType: WebChartStackedKinds | undefined;
  /** The x-axis field for the chart. */
  accessor xAxisField: string;
  /** Generate the proper chart title given the current config. */
  generateChartTitle(): string;
  /** Generate the proper y-axis title given the current config. */
  generateYAxisTitle(): string;
  /**
   * Gets whether the series should be assigned to the second value axis.
   *
   * @param seriesIndex - The index of the series.
   */
  getAssignToSecondValueAxis(seriesIndex: number): boolean;
  /** Gets the list of the category values for the chart. */
  getCustomSortValues(): Promise<string[]>;
  /** Gets the order of the series array by returning an array of series ids. */
  getOrderOfSeries(): string[];
  /**
   * Gets the color of the series based on the series index. If the index is out of bounds, it will return `undefined`.
   *
   * @param seriesIndex - The index of the series.
   */
  getSeriesColor(seriesIndex: number): Color | undefined;
  /**
   * Gets the name of the series based on the series index.
   * If the index is out of bounds, it will return `undefined`.
   *
   * @param seriesIndex - The index of the series.
   */
  getSeriesName(seriesIndex: number): string | undefined;
  /** Gets the sort order for the bar chart. */
  getSortOrder(): HeatChartDataSortingKinds | SerialChartDataSortingKinds;
  /**
   * Moves the custom sort values in-place for the order by list in the config.
   * **Note:** This method should be only used when the sort order is set to `SerialChartDataSortingKinds.customSort`.
   *
   * @param fromIndex - The index to move the custom sort value from.
   * @param toIndex - The index to move the custom sort value to.
   */
  moveCustomSortValuesInOrderByList(fromIndex: number, toIndex: number): void;
  /**
   * Moves a series from one index in the series array to another.
   *
   * @param fromIndex - Index to move the series from.
   * @param toIndex - Index to move the series to.
   */
  moveSeries(fromIndex: number, toIndex: number): void;
  /**
   * Sets whether the series should be assigned to the second value axis.
   *
   * @param assign - The value for the setting.
   * @param seriesIndex - The index of the series.
   */
  setAssignToSecondValueAxis(assign: boolean, seriesIndex: number): void;
  /**
   * Sets the data filter for the bar chart.
   *
   * @param newDataFilter - The new data filter.
   */
  setDataFilters(newDataFilter: WebChartDataFilters | undefined): Promise<void>;
  /**
   * Sets the order of the series array by providing an array of series ids.
   *
   * @param newOrder - The new order of the series array.
   */
  setOrderOfSeries(newOrder: string[]): void;
  /**
   * Sets the color of the series based on the series index.
   *
   * @param newColor - The new color for the series.
   * @param seriesIndex - The index of the series.
   */
  setSeriesColor(newColor: Color | undefined, seriesIndex: number): void;
  /**
   * Sets name of the series based on the series index.
   *
   * @param name - The name for the series.
   * @param seriesIndex - The index of the series.
   */
  setSeriesName(name: string, seriesIndex: number): void;
  /**
   * Sets the sort order for the bar chart.
   *
   * @param newSortOrder - The new sort order.
   * @param orderByList - The list of category's values to order by.
   */
  setSortOrder(newSortOrder: HeatChartDataSortingKinds | SerialChartDataSortingKinds, orderByList?: string[]): void;
  /** Updates the series based on the layer filter. */
  updateSeriesFromLayerFilter(): Promise<void>;
}
declare const SerialChartModelSuperclass: typeof ChartModel & typeof WithGenerateXAxisTitle & typeof WithAxisLinesSymbol & typeof WithAxisLabelsSymbol & typeof WithXAxisTitleSymbol & typeof WithXBounds & typeof WithXAxisTitleVisibility & typeof WithXAxisLabelsVisibility & typeof WithXAxisTitleText & typeof ModelWithTemporalBinning & typeof ModelWithYGuides & typeof ModelWithXGuides & typeof WithDataLabelsSymbol & typeof WithDataLabelsVisibility & typeof WithRotatedState & typeof WithColorMatch & typeof ModelWithTooltips & typeof ModelWithLegend & typeof ModelWithMultiAxes