/**
 * Perform a relational operation to determine if one 2D geometry is within another 2D geometry. Geometry A is within geometry B, when A is the intersection of A and B.
 *
 * Geometry A can be non-simple geometry.
 *
 * ![Within operator](https://developers.arcgis.com/javascript/latest/assets/references/core/operators/within.png "Within operator")
 *
 * @since 4.31
 */
import type { GeometryUnion } from "../types.js";

/**
 * Accelerate a geometry. This method prepares the geometry for faster within operations when the same geometry is tested multiple times (e.g. in a loop with hundreds of iterations). See the [Acceleration](https://developers.arcgis.com/javascript/latest/spatial-analysis/intro-geometry-operators/#acceleration) guide topic for more information.
 *
 * @param geometry - The geometry to accelerate.
 * @returns Returns `true` if the geometry was successfully accelerated.
 */
export function accelerateGeometry(geometry: GeometryUnion): boolean;

/**
 * Perform a within operation on two geometries.
 *
 * @param inner - The base geometry that is tested for the "within" relationship with `outer`.
 * @param outer - The comparison geometry that is tested for the "contains" relationship with `inner`.
 * @returns Returns `true` if `inner` is within `outer`.
 * @example
 * Returns true if a geometry is completely within another
 * const isWithin = withinOperator.execute(polygon1, polygon2);
 */
export function execute(inner: GeometryUnion, outer: GeometryUnion): boolean;

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