import { jsx as t } from "react/jsx-runtime";
import { i as c, s as d } from "./provider.js";
const p = /* @__PURE__ */ d("div")({
  name: "Container",
  class: "c5b6wdg",
  propsAsIs: !1
}), m = "a1rlj479", h = "s35f1di", g = "sj4471g", b = "b12050d8", f = "b1d5ybek", u = (a) => a === "left" || a === "right" ? h : b, y = (a) => a === "left" || a === "right" ? g : f, k = (a) => a === "left" ? "avdxyl3" : a === "right" ? "a1bisd08" : a === "top" ? "a1u9y2aj" : "a1qqaks", o = ({
  children: a,
  style: r,
  className: l,
  enabled: i = !0,
  hiding: e,
  direction: s = "left",
  onAnimationEnd: n
}) => /* @__PURE__ */ t(p, {
  style: r,
  className: c(l, m, k(s), i && !e && u(s), i && e && y(s)),
  onAnimationEnd: n,
  children: a
}), A = /* @__PURE__ */ d("a")({
  name: "Link",
  class: "l1sgte8c",
  propsAsIs: !1
}), B = /* @__PURE__ */ d("div")({
  name: "BannerContainer",
  class: "b7yfc72",
  propsAsIs: !1
}), I = () => A, j = /* @__PURE__ */ d(I())({
  name: "BannerLink",
  class: "bejjq94",
  propsAsIs: !0
}), x = ({ promotion: a, promotionId: r, hiding: l, direction: i = "bottom" }) => {
  var e, s;
  if (!((e = a.additionalBanner) != null && e.imageUrl))
    return null;
  let n = (s = a.additionalBanner) == null ? void 0 : s.url;
  return n && n.indexOf("http") !== 0 && (n = `https://${n}`), /* @__PURE__ */ t(o, { direction: i, hiding: l, children: /* @__PURE__ */ t(B, { className: "BannerContainer", children: /* @__PURE__ */ t(
    j,
    {
      as: n ? "a" : "span",
      className: "BannerLink",
      href: n,
      style: {
        backgroundImage: `url(${a.additionalBanner.imageUrl})`,
        cursor: n ? "pointer" : "default"
      },
      "data-promo-id": r,
      "data-promo-type": a.type,
      "data-a": "banner",
      target: "_blank"
    }
  ) }) });
}, v = /* @__PURE__ */ d("div")({
  name: "SidebarContainer",
  class: "s1abskp8",
  propsAsIs: !1
}), C = ({
  children: a,
  direction: r,
  style: l,
  className: i,
  hiding: e
}) => /* @__PURE__ */ t(o, {
  direction: r,
  style: l,
  hiding: e,
  className: i,
  children: /* @__PURE__ */ t(v, {
    children: a
  })
});
export {
  x as B,
  C as b,
  o as k
};
