import type { FocalStatisticsType } from "../focalStatUtils.js";
import type { BaseNRasterFunctionParameters, BaseRasterFunctionParameters } from "../types.js";

export interface StatisticsParameters extends BaseRasterFunctionParameters {
  /** Number of columns. */
  cols: number;
  /** When true only fills noData pixels */
  fillNoDataOnly?: boolean;
  /** Number of rows. */
  rows: number;
  /** The statistics type */
  statisticsType: FocalStatisticsType;
}

/**
 * Arg statistics input parameters for min, max, and median statistics type.
 *
 * @since 4.32
 */
export interface ArgStatisticsParameters extends BaseNRasterFunctionParameters {
  /** The statistics type. */
  statisticsType: "max" | "min" | "median";
  /**
   * A constant value that will be used when no definitive maximum or minimum can be attained.
   *
   * @default 100
   */
  undefinedClass?: number;
}

/**
 * Arg statistics input parameters for duration statistics type.
 *
 * @since 4.32
 */
export interface ArgStatisticsDurationParameters extends BaseNRasterFunctionParameters {
  /** The highest value equal to or less than the end of the duration. */
  maxValue: number;
  /** The lowest value equal to or greater than the beginning of the duration. */
  minValue: number;
  /** The statistics type. */
  statisticsType: "duration";
}