@anoki/fse-marche-ui
Version:
FSE UI components library
64 lines (63 loc) • 2.28 kB
JavaScript
import { j as r } from "./index.es137.js";
import { Section as n } from "./index.es46.js";
import { clsx as d } from "./index.es139.js";
import './sections/AggregationItems/AggregationItems.css';/* empty css */
import { CardCategory as y } from "./index.es26.js";
import { Col as j } from "./index.es10.js";
import { ArrowLink as h } from "./index.es35.js";
const g = {
HomeServices: "HomeServices",
ServicesByEntityType: "ServicesByEntityType"
}, E = ({
title: e,
description: a,
goToLabel: c,
href: l,
asLink: i = "a",
items: o,
layout: p = g.HomeServices,
className: x
}) => {
const t = p === g.HomeServices ? "ui-aggregation-items-home-services" : "ui-aggregation-items-services-by-entity-type";
return /* @__PURE__ */ r.jsxs(
n,
{
className: d("base-col ui-aggregation-items-section", x),
children: [
/* @__PURE__ */ r.jsxs(j, { className: "ui-aggregation-items-section-content", children: [
/* @__PURE__ */ r.jsxs("div", { className: "ui-aggregation-items-section-title", children: [
/* @__PURE__ */ r.jsx(n.Title, { fs: "2", children: e }),
c && l && /* @__PURE__ */ r.jsx(h, { href: l, asLink: i, fs: "7", children: c.toUpperCase() })
] }),
a && /* @__PURE__ */ r.jsx(n.Description, { children: a })
] }),
/* @__PURE__ */ r.jsx(
"ul",
{
role: "list",
"aria-label": `Lista di ${e}`,
className: `list-style-none ${t}`,
children: o == null ? void 0 : o.map((s) => /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
y,
{
title: s == null ? void 0 : s.name,
description: s == null ? void 0 : s.description,
image: s == null ? void 0 : s.image,
href: (s == null ? void 0 : s.link) || (s == null ? void 0 : s.externalLink),
showIcon: s == null ? void 0 : s.externalLink,
asLink: i,
isExternal: s == null ? void 0 : s.externalLink
},
s._id
) }, s._id))
}
)
]
}
);
};
export {
E as AggregationItems,
g as LAYOUTS
};
//# sourceMappingURL=index.es72.js.map