import { jsx as a, jsxs as r } from "react/jsx-runtime";
import { forwardRef as b } from "react";
import { cx as t } from "../../utils/classNames.js";
import { useArrowTheme as y } from "../../hooks/useArrowTheme.js";
import { Divider as N } from "../divider/Divider.js";
const v = b(
  ({
    dueMonthlyAmount: m,
    dueTodayAmount: d,
    taxesLabel: c,
    a11yLabel: s,
    inverse: i,
    icon: n,
    focused: l = !1,
    onButtonClick: o,
    className: u,
    ...h
  }, p) => {
    const _ = y(), e = i ?? _.inverse;
    return s ? /* @__PURE__ */ a(
      "div",
      {
        ref: p,
        className: t("tdds-purchase-summary-bar", u),
        ...e ? { "data-inverse": "true" } : {},
        role: "region",
        "aria-label": s,
        ...h,
        children: /* @__PURE__ */ r("div", { className: "tdds-purchase-summary-bar__container", children: [
          /* @__PURE__ */ r("div", { className: "tdds-purchase-summary-bar__content-wrapper", children: [
            /* @__PURE__ */ r("ul", { role: "list", children: [
              /* @__PURE__ */ r("li", { role: "listitem", children: [
                /* @__PURE__ */ r("div", { className: "tdds-purchase-summary-bar__content", children: [
                  /* @__PURE__ */ a("span", { className: "tdds-purchase-summary-bar__label", children: "Due monthly:" }),
                  /* @__PURE__ */ r("span", { className: "tdds-purchase-summary-bar__amount", children: [
                    "$",
                    m.toFixed(2)
                  ] })
                ] }),
                /* @__PURE__ */ a(N, { inverse: e, orientation: "vertical" })
              ] }),
              /* @__PURE__ */ a("li", { role: "listitem", children: /* @__PURE__ */ r("div", { className: "tdds-purchase-summary-bar__content", children: [
                /* @__PURE__ */ a("span", { className: "tdds-purchase-summary-bar__label", children: "Due today:" }),
                /* @__PURE__ */ r("span", { className: "tdds-purchase-summary-bar__amount", children: [
                  "$",
                  d.toFixed(2)
                ] })
              ] }) })
            ] }),
            /* @__PURE__ */ r("p", { className: "tdds-purchase-summary-bar__taxes", children: [
              c,
              " taxes and other charges"
            ] })
          ] }),
          /* @__PURE__ */ r(
            "button",
            {
              className: t("tdds-purchase-summary-bar__button", {
                "force-focus": l
              }),
              type: "button",
              onClick: o,
              children: [
                /* @__PURE__ */ a("span", { children: "View Summary" }),
                /* @__PURE__ */ a(
                  "span",
                  {
                    className: "tdds-icon-button",
                    "data-inverse": String(!e),
                    "data-size": "small",
                    "data-background": "primary",
                    children: n
                  }
                )
              ]
            }
          )
        ] })
      }
    ) : null;
  }
);
v.displayName = "PurchaseSummaryBar";
export {
  v as PurchaseSummaryBar
};
//# sourceMappingURL=PurchaseSummaryBar.js.map
