@anoki/fse-ui
Version:
FSE UI components library
113 lines (112 loc) • 4.82 kB
JavaScript
import { j as s } from "./index.es237.js";
import { clsx as i } from "./index.es238.js";
import './components/ui/CardPaymentDocument/CardPaymentDocument.css';/* empty css */
import { Row as d } from "./index.es116.js";
import { Col as e } from "./index.es61.js";
import { Download as w } from "./index.es189.js";
import { Loader as y } from "./index.es106.js";
import { Divider as N } from "./index.es72.js";
import { Button as v } from "./index.es32.js";
const L = ({
headerText: j,
beforeTitle: n,
title: r,
subtitle: m,
footer: a,
isLoading: c,
asLink: g = "a"
}) => {
var x, l, p, t, h;
const u = g;
return /* @__PURE__ */ s.jsxs(
"div",
{
className: i(
"ui-card-payment shadow br-x4 fw-semibold text-slate-28 fs-7"
),
children: [
/* @__PURE__ */ s.jsx(
d,
{
"max-h": "x40",
"min-h": "x40",
as: "header",
justifyContent: "flex-end",
alignItems: "center",
px: "x24",
className: "ui-card-payment-header",
children: /* @__PURE__ */ s.jsx(d, { className: "fw-semibold fs-7", children: j })
}
),
/* @__PURE__ */ s.jsxs("div", { className: "ui-card-payment-main py-x16 px-x24", children: [
/* @__PURE__ */ s.jsxs(
e,
{
pb: "x32",
justifyContent: "space-between",
gap: "x8",
children: [
/* @__PURE__ */ s.jsxs(d, { justifyContent: n != null && n.rightBadgeText ? "space-between" : "flex-end", alignItems: "center", children: [
n && /* @__PURE__ */ s.jsx("div", { className: "fw-semibold", children: n == null ? void 0 : n.leftText }),
(n == null ? void 0 : n.rightBadgeText) && /* @__PURE__ */ s.jsx(
"div",
{
className: i(
"rounded py-x4 px-x16"
),
style: { backgroundColor: n.rightBadgeColor || "#000", color: "#fff", width: "max-content" },
children: n.rightBadgeText
}
)
] }),
/* @__PURE__ */ s.jsx("p", { className: "ui-card-payment-title fs-4 text-slate-20", children: r }),
m && /* @__PURE__ */ s.jsx("div", { style: { fontWeight: 500 }, children: m })
]
}
),
a && /* @__PURE__ */ s.jsxs(e, { mt: "x16", className: "ui-card-payment-footer", children: [
(a == null ? void 0 : a.descriptionText) && /* @__PURE__ */ s.jsx("div", { children: (a == null ? void 0 : a.descriptionText) && /* @__PURE__ */ s.jsx("p", { className: "fw-regular fs-7 text-slate-28 mb-x8", children: a.descriptionText }) }),
/* @__PURE__ */ s.jsxs(d, { className: "ui-card-payment-footer-actions", justifyContent: a != null && a.downloadDoc ? "space-between" : "flex-end", alignItems: "center", children: [
(a == null ? void 0 : a.downloadDoc) && /* @__PURE__ */ s.jsxs(
d,
{
alignItems: "center",
className: i(
!c && "cursor-pointer",
"text-decoration-none text-primary",
"ui-card-payment-download-row"
),
onClick: c || (x = a == null ? void 0 : a.downloadDoc) == null ? void 0 : x.clickCta,
children: [
/* @__PURE__ */ s.jsx(w, {}),
/* @__PURE__ */ s.jsx("p", { children: (l = a == null ? void 0 : a.downloadDoc) == null ? void 0 : l.label }),
/* @__PURE__ */ s.jsx(y, { loading: c, className: "ml-x8" })
]
}
),
(a == null ? void 0 : a.ctaRight) && ((p = a == null ? void 0 : a.ctaRight) == null ? void 0 : p.href) && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
/* @__PURE__ */ s.jsx(N, { bg: "border-divider", className: "ui-document-divider" }),
/* @__PURE__ */ s.jsx(
v,
{
fwClassName: "fw-semibold",
className: "ui-card-payment-cta px-x12",
variant: "secondary",
size: "5",
asLink: u,
href: ((t = a == null ? void 0 : a.ctaRight) == null ? void 0 : t.href) ?? void 0,
children: (h = a == null ? void 0 : a.ctaRight) == null ? void 0 : h.label
}
)
] })
] })
] })
] })
]
}
);
};
export {
L as CardPaymentDocument
};
//# sourceMappingURL=index.es51.js.map