@anoki/fse-ui
Version:
FSE UI components library
92 lines (91 loc) • 3.07 kB
JavaScript
import { j as e } from "./index.es180.js";
import { Container as p } from "./index.es6.js";
import { Divider as u } from "./index.es202.js";
import './components/navigations/Footer/Footer.css';/* empty css */
import { clsx as j } from "./index.es182.js";
import { FseMS as N } from "./index.es123.js";
import { FseMEF as E } from "./index.es121.js";
import { FseDGT as U } from "./index.es120.js";
import { FseUE as b } from "./index.es124.js";
const f = (a) => {
if (!a) return !1;
try {
const o = new URL(a), m = new URL(window.location.href);
return o.hostname !== m.hostname;
} catch {
return !0;
}
}, O = ({
footerLinks: a,
version: o,
asLink: m = "a",
className: h,
additionalLogo: x,
settingsFooterLinks: r = {
FseMS: "",
FseMEF: "",
FseDGT: "",
FseUE: "",
externalLink: ""
}
}) => {
const n = m, d = [
N,
E,
U,
b
];
return /* @__PURE__ */ e.jsx("footer", { className: j("bg-slate-20", "ui-footer", h), children: /* @__PURE__ */ e.jsxs(p, { children: [
/* @__PURE__ */ e.jsxs("section", { className: "ui-footer-institution-logos", children: [
d.map((l, c) => {
const t = ["FseMS", "FseMEF", "FseDGT", "FseUE"][c], i = (r == null ? void 0 : r[t]) || "#", s = f(i);
return /* @__PURE__ */ e.jsx(
n,
{
href: i,
target: s ? "_blank" : "_self",
rel: s ? "noopener noreferrer" : void 0,
children: /* @__PURE__ */ e.jsx(l, { className: "ui-footer-logo" })
},
c
);
}),
x && /* @__PURE__ */ e.jsx(
n,
{
href: r == null ? void 0 : r.externalLink,
target: f((r == null ? void 0 : r.externalLink) || "") ? "_blank" : "_self",
rel: f((r == null ? void 0 : r.externalLink) || "") ? "noopener noreferrer" : void 0,
children: /* @__PURE__ */ e.jsx(
"img",
{
src: x,
alt: "Additional Logo",
className: "ui-footer-logo"
}
)
}
)
] }),
/* @__PURE__ */ e.jsx(u, {}),
/* @__PURE__ */ e.jsxs("section", { className: "ui-footer-links-container", children: [
/* @__PURE__ */ e.jsx("h3", { className: "visually-hidden", children: "Sezione Link Utili" }),
/* @__PURE__ */ e.jsx("ul", { className: "ui-footer-links-list", role: "list", children: a == null ? void 0 : a.map((l, c) => /* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsx(
n,
{
href: l.href,
target: l.target ?? "_self",
className: "text-white fs-6 fw-semibold text-decoration-underline",
"aria-label": `Vai alla pagina: ${l.label}`,
rel: l.target === "_blank" ? "noopener noreferrer" : void 0,
children: l.label
}
) }, c)) }),
/* @__PURE__ */ e.jsx("span", { className: "text-white fw-normal ui-footer-version", children: o })
] })
] }) });
};
export {
O as Footer
};
//# sourceMappingURL=index.es16.js.map