import type { ChartModel } from "../chart-model/chart-model.js";
import type { GuideOrientation } from "../interfaces/common.js";
import type { WebChartTextSymbol } from "../../spec/web-chart.js";
import type { ISimpleFillSymbol, ISimpleLineSymbol } from "../../spec/rest-js-types.js";

export abstract class ModelWithGuides extends ChartModel {
  /** The guide labels text symbol (font, color, style). */
  accessor guideLabelsSymbol: WebChartTextSymbol | undefined;
  /**
   * Gets whether the guide should be rendered above the other chart elements.
   *
   * @param index - Default `0`. The index of the guide in the list of guides for the given axis orientation.
   * @param orientation - Default `y`. The axis orientation of the guide.
   */
  getGuideAbove(index?: number, orientation?: GuideOrientation): boolean;
  /**
   * Gets the end value of a guide.
   *
   * @param index - Default `0`. The index of the guide in the list of guides for the given axis orientation.
   * @param orientation - Default `y`. The axis orientation of the guide.
   */
  getGuideEnd(index?: number, orientation?: GuideOrientation): Date | number | string | null | undefined;
  /**
   * Gets the guide label text.
   *
   * @param index - Default `0`. The index of the guide in the list of guides for the given axis orientation.
   * @param orientation - Default `y`. The axis orientation of the guide.
   */
  getGuideLabelText(index?: number, orientation?: GuideOrientation): string | undefined;
  /**
   * Gets the name of a guide.
   *
   * @param index - Default `0`. The index of the guide in the list of guides for the given axis orientation.
   * @param orientation - Default `y`. The axis orientation of the guide.
   */
  getGuideName(index?: number, orientation?: GuideOrientation): string | undefined;
  /**
   * Gets the start value of a guide.
   *
   * @param index - Default `0`. The index of the guide in the list of guides for the given axis orientation.
   * @param orientation - Default `y`. The axis orientation of the guide.
   */
  getGuideStart(index?: number, orientation?: GuideOrientation): Date | number | string | null;
  /**
   * Gets the guide style.
   *
   * @param index - Default `0`. The index of the guide in the list of guides for the given axis orientation.
   * @param orientation - Default `y`. The axis orientation of the guide.
   */
  getGuideStyle(index?: number, orientation?: GuideOrientation): ISimpleFillSymbol | ISimpleLineSymbol | undefined;
  /**
   * Gets whether a guide is visible.
   *
   * @param index - Default `0`. The index of the guide in the list of guides for the given axis orientation.
   * @param orientation - Default `y`. The axis orientation of the guide.
   */
  getGuideVisibility(index?: number, orientation?: GuideOrientation): boolean;
  /**
   * Gets whether the tooltip text color should be reversed for a guide.
   *
   * @param index - The index of the guide in the list of guides for the given axis orientation.
   * @param orientation - The axis orientation of the guide.
   */
  getTooltipReverseColor(index: number, orientation?: GuideOrientation): boolean;
  /**
   * Sets whether the guide should be rendered above the other chart elements.
   *
   * @param above - New above boolean to set.
   * @param index - Default `0`. The index of the guide in the list of guides for the given axis orientation.
   * @param orientation - Default `y`. The axis orientation of the guide.
   */
  setGuideAbove(above: boolean, index?: number, orientation?: GuideOrientation): void;
  /**
   * Sets the end value of a guide.
   *
   * @param end - New end value to set.
   * @param index - Default `0`. The index of the guide in the list of guides for the given axis orientation.
   * @param orientation - Default `y`. The axis orientation of the guide.
   */
  setGuideEnd(end: Date | number | string | null | undefined, index?: number, orientation?: GuideOrientation): void;
  /**
   * Sets the guide label text.
   *
   * @param labelText - New label text to set.
   * @param index - Default `0`. The index of the guide in the list of guides for the given axis orientation.
   * @param orientation - Default `y`. The axis orientation of the guide.
   */
  setGuideLabelText(labelText: string, index?: number, orientation?: GuideOrientation): void;
  /**
   * Sets the name of a guide.
   *
   * @param name - New name to set.
   * @param index - Default `0`. The index of the guide in the list of guides for the given axis orientation.
   * @param orientation - Default `y`. The axis orientation of the guide.
   */
  setGuideName(name: string, index?: number, orientation?: GuideOrientation): void;
  /**
   * Sets the start value of a guide.
   *
   * @param start - New start value to set.
   * @param index - Default `0`. The index of the guide in the list of guides for the given axis orientation.
   * @param orientation - Default `y`. The axis orientation of the guide.
   */
  setGuideStart(start: Date | number | string | null, index?: number, orientation?: GuideOrientation): void;
  /**
   * Sets the guide style.
   *
   * @param style - New style to set.
   * @param index - Default `0`. The index of the guide in the list of guides for the given axis orientation.
   * @param orientation - Default `y`. The axis orientation of the guide.
   * @example
   * ```ts
   * chartModel.setGuideStyle(
   *  {
   *     type: "esriSLS",
   *     color: [0, 200, 0, 255],
   *     width: 2,
   *   },
   *   1,
   * );
   * ```
   */
  setGuideStyle(style: ISimpleFillSymbol | ISimpleLineSymbol, index?: number, orientation?: GuideOrientation): void;
  /**
   * Sets whether a guide is visible.
   *
   * @param visible - New visibility to set.
   * @param index - Default `0`. The index of the guide in the list of guides for the given axis orientation.
   * @param orientation - Default `y`. The axis orientation of the guide.
   */
  setGuideVisibility(visible: boolean, index?: number, orientation?: GuideOrientation): void;
  /**
   * Sets whether the tooltip text color should be reversed for a guide.
   *
   * @param reverseColor - New reverseColor boolean to set.
   * @param index - The index of the guide in the list of guides for the given axis orientation.
   * @param orientation - The axis orientation of the guide.
   */
  setTooltipReverseColor(reverseColor: boolean, index: number, orientation?: GuideOrientation): void;
}