function renderGeometry(replayGroup, geometry, style, feature, index) {
  if (geometry.getType() == 'GeometryCollection') {
    const geometries =
      /** @type {import("../geom/GeometryCollection.js").default} */ (
        geometry
      ).getGeometries();
    for (let i = 0, ii = geometries.length; i < ii; ++i) {
      renderGeometry(replayGroup, geometries[i], style, feature, index);
    }
    return;
  }
  const replay = replayGroup.getBuilder(style.getZIndex(), 'Default');
  replay.drawCustom(
    /** @type {import("../geom/SimpleGeometry.js").default} */ (geometry),
    feature,
    style.getRenderer(),
    style.getHitDetectionRenderer(),
    index,
  );
}
@param {import("../render/canvas/BuilderGroup.js").default} replayGroup Replay group.
@param {import("../geom/Geometry.js").default|import("../render/Feature.js").default} geometry Geometry.
@param {import("../style/Style.js").default} style Style.
@param {import("../Feature.js").FeatureLike} feature Feature.
@param {number} [index] Render order index.