import type { ChartModel } from "../chart-model/chart-model.js";
import type { ModelParams } from "../interfaces/chart-interfaces.js";
import type { ModelTypes, BoxPlotDataSortingKinds } from "../interfaces/common.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 { 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 { WebChartDataFilters } from "../../spec/web-chart.js";
import type { Color } from "../../spec/rest-js-types.js";
import type { RESTSimpleLineSymbolStyle } from "../../spec/rest-js-object-literals.js";
import type { ChartConfig } from "../../utils/types/index.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 { ModelWithYGuides } from "../mixins/model-with-y-guides.js";

export class BoxPlotModel extends BoxPlotModelSuperclass {
  /**
   * The index of the box plot series in the series array in config object when show mean is true.
   *
   * **Note**: There is only one box plot series when show mean is `true`. The function returns `-1` if show mean is `false`.
   */
  get boxPlotSeriesIndexWhenMeanLinesShown(): number;
  /** The category field for the box plot. */
  accessor category: string;
  /**
   * The color of the boxes when showing mean lines.
   *
   * Only applicable when mean lines are shown.
   */
  accessor meanLinesBoxColor: Color | undefined;
  /** The numeric fields array for the box plot. */
  get numericFields(): string[];
  set numericFields(value: string[] | string);
  /** The list of category values for custom sort. */
  accessor orderByList: string[];
  /** The order of the series array by returning an array of series ids. */
  accessor orderOfSeries: string[];
  /** Whether mean lines are shown. */
  accessor showMeanLines: boolean | undefined;
  /** Whether outliers are shown. */
  accessor showOutliers: boolean;
  /** The split-by field for the box plot. */
  accessor splitByField: string;
  /** Whether values are standardized as z-scores. */
  accessor standardizeValues: boolean;
  /** Generate the proper chart title given the current config. */
  generateChartTitle(): string;
  /** Generate the proper y-axis title given the current config. */
  generateYAxisTitle(): string;
  /** Gets the list of the category values for the chart. */
  getCustomSortValues(): Promise<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 line style of the series based on the series index. If the index is out of bounds, it will return `undefined`.
   *
   * **Note**: Only applicable when mean lines are shown.
   *
   * @param seriesIndex - The index of the series.
   */
  getSeriesLineStyle(seriesIndex: number): RESTSimpleLineSymbolStyle | undefined;
  /**
   * Gets the line width of the series based on the series index. If the index is out of bounds, it will return `undefined`.
   *
   * **Note**: Only applicable when mean lines are shown.
   *
   * @param seriesIndex - The index of the series.
   */
  getSeriesLineWidth(seriesIndex: number): number | 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 of the box plot data. */
  getSortOrder(): BoxPlotDataSortingKinds;
  /**
   * Move 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 `BoxPlotDataSortingKinds.customSort`.
   *
   * @param fromIndex - The index to move the custom sort item from.
   * @param toIndex - The index to move the category item 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;
  /** Returns whether the series styling is able to be reset. */
  resetAvailable(): boolean;
  /** Resets the config to the default config */
  resetConfig(): void;
  /** Resets the series styling to the default styling. */
  resetSeriesStyling(): void;
  /**
   * Sets the data filter for the box plot.
   *
   * @param newDataFilter - The new data filter.
   * @example
   * ```typescript
   * chartModel.setDataFilters({
   *    where: "population > 100000",
   * });
   * ```
   */
  setDataFilters(newDataFilter: WebChartDataFilters | undefined): Promise<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.
   * @example
   * ```typescript
   * chartModel.setSeriesColor([100, 100, 100, 255], 1);
   * ```
   */
  setSeriesColor(newColor: Color | undefined, seriesIndex: number): void;
  /**
   * Sets the line style of the series based on the series index.
   *
   * **Note**: Only applicable when mean lines are shown.
   *
   * @param newStyle - The new style for the series.
   * @param seriesIndex - The index of the series.
   */
  setSeriesLineStyle(newStyle: RESTSimpleLineSymbolStyle | undefined, seriesIndex: number): void;
  /**
   * Sets the line width of the series based on the series index.
   *
   * **Note**: Only applicable when mean lines are shown.
   *
   * @param newWidth - The new width for the series.
   * @param seriesIndex - The index of the series.
   */
  setSeriesLineWidth(newWidth: number | undefined, seriesIndex: number): void;
  /**
   * Sets name of the series based on the series index.
   *
   * @param newName - The new name for the series.
   * @param seriesIndex - The index of the series.
   */
  setSeriesName(newName: string, seriesIndex: number): void;
  /**
   * Sets the sort order of the box plot data.
   *
   * @param newSortOrder - The new sort order.
   * @param orderByList - The new list of category's values for custom sort.
   */
  setSortOrder(newSortOrder: BoxPlotDataSortingKinds, orderByList?: string[]): void;
  /**
   * Completes the async setup process for the chart model. Must be called before using the model.
   *
   * @param params
   */
  setup(params: ModelParams<ChartConfig<typeof ModelTypes.BoxPlot>>): Promise<void>;
  /** Updates the series based on the layer filter. */
  updateSeriesFromLayerFilter(): Promise<void>;
}
declare const BoxPlotModelSuperclass: typeof ChartModel & typeof WithGenerateXAxisTitle & typeof WithAxisLinesSymbol & typeof WithAxisLabelsSymbol & typeof WithXAxisTitleSymbol & typeof WithXBounds & typeof WithXAxisTitleVisibility & typeof WithXAxisLabelsVisibility & typeof WithXAxisTitleText & typeof ModelWithYGuides & typeof WithDataLabelsSymbol & typeof WithDataLabelsVisibility & typeof WithRotatedState & typeof WithColorMatch & typeof ModelWithTooltips & typeof ModelWithLegend & typeof ModelWithMultiAxes