function renderFeature(
  replayGroup,
  feature,
  style,
  squaredTolerance,
  listener,
  transform,
  declutter,
  index,
) {
  const loadingPromises = [];
  const imageStyle = style.getImage();
  if (imageStyle) {
    let loading = true;
    const imageState = imageStyle.getImageState();
    if (imageState == ImageState.LOADED || imageState == ImageState.ERROR) {
      loading = false;
    } else {
      if (imageState == ImageState.IDLE) {
        imageStyle.load();
      }
    }
    if (loading) {
      loadingPromises.push(imageStyle.ready());
    }
  }
  const fillStyle = style.getFill();
  if (fillStyle && fillStyle.loading()) {
    loadingPromises.push(fillStyle.ready());
  }
  const loading = loadingPromises.length > 0;
  if (loading) {
    Promise.all(loadingPromises).then(() => listener(null));
  }
  renderFeatureInternal(
    replayGroup,
    feature,
    style,
    squaredTolerance,
    transform,
    declutter,
    index,
  );

  return loading;
}
@param {import("../render/canvas/BuilderGroup.js").default} replayGroup Replay group.
@param {import("../Feature.js").FeatureLike} feature Feature.
@param {import("../style/Style.js").default} style Style.
@param {number} squaredTolerance Squared tolerance.
@param {function(import("../events/Event.js").default): void} listener Listener function.
@param {import("../proj.js").TransformFunction} [transform] Transform from user to view projection.
@param {boolean} [declutter] Enable decluttering.
@param {number} [index] Render order index..
@return {boolean} `true` if style is loading.