import { jsx as n, jsxs as d, Fragment as c } from "react/jsx-runtime";
import { formatMoney as a } from "../../lib/formatMoney.js";
import { cn as i } from "../../lib/utils.js";
function b({
  amount: r,
  currencyCode: t,
  compareAtPriceAmount: s,
  compareAtPriceCurrencyCode: o,
  currentPriceClassName: e,
  originalPriceClassName: m,
  containerClassName: x,
  className: f
}) {
  if (!r || !t)
    return null;
  const g = s && s !== r, l = String(r), h = s ? String(s) : void 0;
  return /* @__PURE__ */ n(
    "div",
    {
      className: i("flex items-center gap-2", x, f),
      children: g ? /* @__PURE__ */ d(c, { children: [
        /* @__PURE__ */ n(
          "span",
          {
            className: i(
              "text-sm font-semibold text-gray-900",
              e
            ),
            children: a(l, t)
          }
        ),
        /* @__PURE__ */ n(
          "span",
          {
            className: i(
              "text-sm text-gray-500 line-through",
              m
            ),
            children: a(
              h,
              o || t
            )
          }
        )
      ] }) : /* @__PURE__ */ n(
        "span",
        {
          className: i(
            "text-sm font-semibold text-gray-900",
            e
          ),
          children: a(l, t)
        }
      )
    }
  );
}
export {
  b as ProductVariantPrice
};
//# sourceMappingURL=product-variant-price.js.map
