import { useMemo as p } from "react";
import { a as L, u as V } from "./index-28007ca6.mjs";
import { A as l } from "./Env-92498313.mjs";
function x(m, n) {
  const {
    state: { discoveryConfigData: o }
  } = L(), {
    state: { playerPortalConfigData: e, launcherData: r, loginData: s, twitchDropData: c }
  } = V();
  return {
    companyLogo: p(() => {
      var u;
      let t = null;
      switch (m) {
        case l.LAUNCHER: {
          const a = r == null ? void 0 : r.logoVariant.data;
          t = a ? a[n] : null;
          break;
        }
        case l.LOGIN: {
          const a = s == null ? void 0 : s.logoVariant.data;
          t = a ? a[n] : null;
          break;
        }
        case l.PP: {
          const a = e == null ? void 0 : e.logoVariant.data;
          t = a ? a[n] : null;
          break;
        }
        case l.TWITCHDROP: {
          const a = c == null ? void 0 : c.logoVariant.data;
          t = a ? a[n] : null;
          break;
        }
      }
      const g = t ?? (o == null ? void 0 : o.companyLogo.data.defaultIndex) ?? 0;
      return ((u = o == null ? void 0 : o.companyLogo.data.images[g]) == null ? void 0 : u.url) || "";
    }, [o, e, r, s, c])
  };
}
export {
  x as u
};
