/**
 * Create a minimum bounding circle for the input geometry.
 * The output is a polygon with a single closed circular segment containing curves.
 * Implements the Welzl's algorithm using greedy heuristic with expected O(n) time complexity.
 *
 * > [!WARNING]
 * >
 * > **Note**
 * >
 * > If curves are not needed, then [densify](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/densifyOperator/) the output geometry.
 *
 * @since 4.31
 */
import type Polygon from "../Polygon.js";
import type { GeometryUnion } from "../types.js";

export interface Options {
  /**
   * If `true`, the input geometries will be merged into a single geometry before
   * calculating the minimum bounding circle.
   *
   * @default false
   */
  merge?: boolean;
}

/**
 * Performs the minimum bounding circle operation on the geometry.
 *
 * @param geometry - The input geometry.
 * @returns Returns the minimum bounding circle polygon with [curves](https://developers.arcgis.com/javascript/latest/references/core/geometry/Polygon/#curveRings).
 * @example
 * // Perform the minimum bounding circle operation
 * const minimumBoundingCircle = minimumBoundingCircleOperator.execute(polygon);
 */
export function execute(geometry: GeometryUnion): Polygon;

/**
 * Performs the minimum bounding circle operation on the geometry set.
 *
 * @param geometries - The set of input geometries.
 * All the geometries must have the same spatial reference.
 * @param options - Additional options.
 * @returns Returns the minimum bounding circle polygons with [curves](https://developers.arcgis.com/javascript/latest/references/core/geometry/Polygon/#curveRings).
 */
export function executeMany(geometries: GeometryUnion[], options?: Options): Polygon[];

/**
 * Indicates if the operator supports input geometries that contain curves.
 * The value will always be `false`.
 */
export const supportsCurves: boolean;