import type { ModelParams } from "../interfaces/chart-interfaces.js";
import type { ModelTypes, SerialChartDataSortingKinds } from "../interfaces/common.js";
import type { SerialChartModel } from "../serial-chart-model/serial-chart-model.js";
import type { ChartConfig } from "../../utils/types/index.js";

export class BarChartModel extends SerialChartModel {
  /**
   * Gets whether to hide oversized data labels of the side-by-side series based on the series index.
   * If the index is out of bounds, it will return `undefined`.
   *
   * @param seriesIndex - The index of the series.
   */
  getSeriesHideOversizedSideBySideLabels(seriesIndex: number): boolean | undefined;
  /**
   * Gets whether to hide oversized stacked labels 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.
   */
  getSeriesHideOversizedStackedLabels(seriesIndex: number): boolean | undefined;
  /**
   * Gets the sort order for the bar chart.
   *
   * @returns {"xAxisAsc" | "xAxisDesc" | "yAxisAsc" | "yAxisDesc" | "customSort"}
   */
  getSortOrder(): SerialChartDataSortingKinds;
  /** Returns whether the series styling is able to be reset. */
  resetAvailable(): boolean;
  /** Resets the series styling to the default styling. */
  resetSeriesStyling(): void;
  /**
   * Sets whether to hide oversized data labels of the side-by-side series based on the series index.
   *
   * @param hide - The value for hiding oversized data labels.
   * @param seriesIndex - The index of the series.
   */
  setSeriesHideOversizedSideBySideLabels(hide: boolean | undefined, seriesIndex: number): void;
  /**
   * Sets whether to hide oversized stacked labels of the series based on the series index.
   *
   * @param hide - The value for hiding oversized stacked labels.
   * @param seriesIndex - The index of the series. When not provided all the series will be updated.
   */
  setSeriesHideOversizedStackedLabels(hide: boolean | undefined, seriesIndex?: number): 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.BarChart>>): Promise<void>;
}