import { jsx as t, jsxs as i } from "react/jsx-runtime";
import { b as g, H as C } from "./index.dWlEA7uO.js";
import { a as h } from "./index.CfQlFjZU.js";
import { C as A } from "./card.CVCKhKP6.js";
import { B as S } from "./ButtonGroup.GFy-lPs3.js";
import { S as I } from "./shared.EdGf6tcG.js";
import "react";
import { C as x } from "./CardHeader.ZIkhzd4s.js";
import { F as N } from "./FormatCurrency.6NXzSvUH.js";
import { a as e } from "./Stack.XB4icBMm.js";
import { A as _ } from "./AffiliateCommissionTag.CT1MTbyb.js";
const z = "creator_accentSmall_7tgvZ", P = "creator_productImage_8pRGm", T = "creator_productTitle_RGWcH", c = { accentSmall: z, productImage: P, productTitle: T };
function b(r) {
  return {
    ...r,
    accentSmallClassName: c.accentSmall,
    productTitleClassName: c.productTitle
  };
}
function k({
  name: r,
  image: a,
  onAddProduct: s,
  onSeeDetails: n,
  price: { amount: l, currency: o },
  commissionRate: m,
  commissionType: d,
  className: p,
  accentSmallClassName: u,
  productTitleClassName: f
}) {
  return /* @__PURE__ */ t(A, { className: p, elevation: "high", interaction: "static", children: /* @__PURE__ */ i(e, { direction: "column", spacing: 2, children: [
    /* @__PURE__ */ i(e, { direction: "row", spacing: 2, alignItems: "center", children: [
      /* @__PURE__ */ t(v, { src: a, alt: r }),
      /* @__PURE__ */ i(e, { direction: "column", spacing: 1, children: [
        /* @__PURE__ */ t("div", { className: f, children: /* @__PURE__ */ t(x, { size: "small", children: r }) }),
        /* @__PURE__ */ i(e, { direction: "row", alignItems: "center", spacing: 1, children: [
          /* @__PURE__ */ t("p", { className: u, children: /* @__PURE__ */ t(N, { amount: l, currency: o }) }),
          /* @__PURE__ */ t(
            _,
            {
              currency: o,
              commissionRate: m,
              commissionType: d
            }
          )
        ] })
      ] })
    ] }),
    /* @__PURE__ */ t(
      S,
      {
        buttons: [
          {
            label: "Add Product",
            size: "xsmall",
            prefixIcon: /* @__PURE__ */ t(g, { size: 24 }),
            onClick: () => s()
          },
          {
            semantic: I.SECONDARY,
            prefixIcon: /* @__PURE__ */ t(C, { size: 24 }),
            label: "See Details",
            size: "xsmall",
            onClick: () => n()
          }
        ]
      }
    )
  ] }) });
}
const L = h(
  k,
  b
);
function v({ src: r, alt: a }) {
  return /* @__PURE__ */ t("img", { src: r, alt: a, className: c.productImage });
}
export {
  L as A
};
