import { DdgImageEngine } from "../../engines/ddg-image.js";
import { BraveImageEngine } from "../../engines/brave-image.js";
import { wrapWithRetryAndBreaker } from "../engine-base.js";
import { getConfig } from "../../../config.js";
let cached = null;
function getImageEngines() {
  if (cached) return cached;
  const entries = [
    // DDG image: zero-key, HTML-bootstrapped vqd → i.js JSON. Higher weight
    // because it's the deterministic floor — without it, image search would
    // require Brave's API key to work at all.
    { engine: wrapWithRetryAndBreaker(new DdgImageEngine()), weight: 1.2, supportsDateFilter: false }
  ];
  if (getConfig().braveApiKey) {
    entries.push({ engine: wrapWithRetryAndBreaker(new BraveImageEngine()), weight: 1.2, supportsDateFilter: false });
  }
  cached = entries;
  return cached;
}
function _resetImageEnginesForTest() {
  cached = null;
}
export {
  _resetImageEnginesForTest,
  getImageEngines
};
//# sourceMappingURL=images.js.map