/**
 * D3 Shape Polyfill - Lightweight SVG shape generators.
 *
 * This is a drop-in replacement for d3-shape, implementing only the methods
 * used in the Vega chart rendering system: line, arc, and pie.
 *
 * @see VD-5022 - [Zero Dependencies] remove d3 dependency
 */
declare type LineAccessor<T> = (d: T, i?: number) => number;
/**
 * A line generator that creates SVG path data strings from data arrays.
 * Mimics d3.line() with .x() and .y() value extractors.
 */
declare class LineGenerator<T> {
  /**
   * Sets the x accessor function.
   *
   * @param accessor - Function that returns the x value for a datum.
   * @returns This generator for chaining.
   */
  x(accessor: LineAccessor<T>): this;
  /**
   * Sets the y accessor function.
   *
   * @param accessor - Function that returns the y value for a datum.
   * @returns This generator for chaining.
   */
  y(accessor: LineAccessor<T>): this;
  /**
   * Generates an SVG path data string for the given data.
   * Called as a function (used by d3's attr('d', lineGenerator)).
   *
   * @param data - Array of data points.
   * @returns SVG path data string (M...L...L...).
   */
  generate(data: T[]): string;
  /** Default x value extractor: reads `.x` property or first array index. */
  private xAccessor;
  /** Default y value extractor: reads `.y` property or second array index. */
  private yAccessor;
}
/**
 * Creates a line generator. Mimics d3.line<T>().
 * The returned object is also callable as a function for d3 compatibility.
 *
 * @returns A new LineGenerator with callable function interface.
 */
export declare function line<T = [number, number]>(): LineGenerator<T> & ((data: T[]) => string);
/**
 * An arc generator that creates SVG path data strings for arc/pie slices.
 * Mimics d3.arc<T>() with .innerRadius() and .outerRadius() value setters.
 */
declare class ArcGenerator<T> {
  /** Inner radius value for the arc. */
  private innerRadiusValue;
  /** Outer radius value for the arc. */
  private outerRadiusValue;
  /**
   * Sets the inner radius for the arc.
   *
   * @param radius - Inner radius value.
   * @returns This generator for chaining.
   */
  innerRadius(radius: number): this;
  /**
   * Sets the outer radius for the arc.
   *
   * @param radius - Outer radius value.
   * @returns This generator for chaining.
   */
  outerRadius(radius: number): this;
  /**
   * Generates an SVG path data string for an arc datum.
   * The datum must have startAngle and endAngle properties (in angle units).
   *
   * @param d - Arc datum with startAngle and endAngle.
   * @returns SVG path data string for the arc.
   */
  generate(d: T): string;
}
/**
 * Creates an arc generator. Mimics d3.arc<T>().
 * The returned object is also callable as a function for d3 compatibility.
 *
 * @returns A new ArcGenerator with callable function interface.
 */
export declare function arc<T>(): ArcGenerator<T> & ((d: T) => string);
/**
 * A pie arc datum produced by the pie generator.
 */
export declare type PieArcDatum<T> = {
  data: T;
  index: number;
  value: number;
  startAngle: number;
  endAngle: number;
  padAngle: number;
};
declare type PieValueAccessor<T> = (d: T) => number;
/**
 * A pie layout generator that computes start/end angles for data items.
 * Mimics d3.pie<T>() with .value() setter.
 */
declare class PieGenerator<T> {
  /**
   * Sets the value accessor function.
   *
   * @param accessor - Function that returns the numeric value for each datum.
   * @returns This generator for chaining.
   */
  value(accessor: PieValueAccessor<T>): this & ((data: T[]) => PieArcDatum<T>[]);
  /**
   * Computes pie arc data from the input data array.
   *
   * @param data - Array of data items.
   * @returns Array of PieArcDatum with computed angles.
   */
  generate(data: T[]): PieArcDatum<T>[];
  /** Default value extractor: reads `.value` property or falls back to 0. */
  private valueAccessor;
}
/**
 * Creates a pie layout generator. Mimics d3.pie<T>().
 * The returned object is also callable as a function for d3 compatibility.
 *
 * @returns A new PieGenerator with callable function interface.
 */
export declare function pie<T>(): PieGenerator<T> & ((data: T[]) => PieArcDatum<T>[]);
export {};
