import { MediumHelper as d } from "./accelbyte-widgets392.mjs";
import { YoutubeVideoMediumCodec as m } from "./accelbyte-widgets396.mjs";
import { ImageMediumCodec as u } from "./accelbyte-widgets397.mjs";
const f = Object.freeze({
  heroBanner: "hero-banner",
  featured: "featured",
  screenshot: "screenshot",
  productCover: "product-cover",
  productBanner: "product-banner"
}), t = class {
  static getScreenshotImages(e) {
    return e.filter((r) => r.as === f.screenshot);
  }
};
let n = t;
n.getMedia = (e, r) => {
  if (r && r.medias && r.medias.length > 0)
    return r.medias;
  if (e != null && e.images) {
    const a = [];
    return t.getScreenshotImages(e.images).forEach((s) => {
      const [o, c] = d.fromRaw(s);
      !c && o && a.push(o);
    }), [
      ...a.filter((s) => m.safeParse(s).success),
      ...a.filter((s) => u.safeParse(s).success)
    ];
  }
  return null;
};
export {
  n as ItemHelper,
  f as ItemImageTag
};
