@anoki/fse-marche-ui
Version:
FSE UI components library
117 lines (116 loc) • 3.74 kB
JavaScript
import { j as e } from "./index.es137.js";
import './components/ui/CardMapDoctor/CardMapDoctor.css';/* empty css */
import { useState as g, useRef as C } from "react";
import { Root as v, Indicator as b } from "./index.es170.js";
import { useClickOutside as k } from "./index.es171.js";
import { Row as y } from "./index.es9.js";
import { Col as c } from "./index.es10.js";
const $ = ({
titleTag: x = "h3",
availableLabel: m = "Disponibile",
specialization: p = "Medico di famiglia | Neurologia",
href: h = "/",
addressLabel: f,
linkLabel: a = "Apri dettaglio",
asLink: o = "a",
className: u,
doctor: s,
setSelectedCard: l = () => {
},
keepSelectionOnNavigation: d = !1
}) => {
const w = o, [t, n] = g(!1), r = C(null), i = s == null ? void 0 : s.offices[0];
k(
r,
t,
() => n(!1),
() => l(""),
d
);
const j = /* @__PURE__ */ e.jsx(
w,
{
className: "text-decoration-none fs-7 fw-bold text-primary",
href: h,
children: a == null ? void 0 : a.toUpperCase()
}
), N = () => /* @__PURE__ */ e.jsx(
"svg",
{
width: "14",
height: "14",
viewBox: "0 0 12 12",
fill: "none",
xmlns: "http://www.w3.org/2000/svg",
"aria-hidden": "true",
children: /* @__PURE__ */ e.jsx(
"path",
{
d: "M10 3L4.5 8.5L2 6",
stroke: "white",
strokeWidth: "2",
strokeLinecap: "round",
strokeLinejoin: "round"
}
)
}
);
return /* @__PURE__ */ e.jsxs(
y,
{
br: "x4",
p: "x24",
gap: "x16",
bg: "white",
text: "slate-20",
ref: r,
className: `${u} ${t ? "ui-is-active ui-card-search" : "ui-card-search"} shadow cursor-pointer`,
onClick: () => {
n(!0), l(s == null ? void 0 : s.code);
},
children: [
/* @__PURE__ */ e.jsx(
v,
{
id: s == null ? void 0 : s.code,
checked: t,
className: "ui-checkbox-filter",
children: /* @__PURE__ */ e.jsx(b, { children: /* @__PURE__ */ e.jsx(N, {}) })
}
),
/* @__PURE__ */ e.jsxs(c, { justifyContent: "center", className: "w-full", children: [
/* @__PURE__ */ e.jsxs(c, { pb: "x16", children: [
/* @__PURE__ */ e.jsxs(x, { className: "flex-1 text-decoration-none fs-4 fw-semibold", children: [
"Dott. ",
s == null ? void 0 : s.firstName,
" ",
s == null ? void 0 : s.lastName
] }),
/* @__PURE__ */ e.jsx("p", { className: "fs-6 fw-regular text-slate-28", children: p }),
/* @__PURE__ */ e.jsx(
"div",
{
className: "ui-available-label mt-x4 px-x16 py-x4 bg-status-success text-white rounded fw-semibold fs-7",
children: m.toUpperCase()
}
)
] }),
/* @__PURE__ */ e.jsxs("div", { className: "text-slate-28 fs-6", children: [
/* @__PURE__ */ e.jsx("div", { className: "fw-bold", children: f }),
/* @__PURE__ */ e.jsx("div", { className: "w-full", children: /* @__PURE__ */ e.jsxs("p", { className: "fw-regular", children: [
i != null && i.address ? i.address.charAt(0).toUpperCase() + i.address.slice(1).toLowerCase() : "",
",",
" ",
i != null && i.city ? i.city.charAt(0).toUpperCase() + i.city.slice(1).toLowerCase() : ""
] }) }),
/* @__PURE__ */ e.jsx("div", { className: "pt-x8", children: j })
] })
] })
]
}
);
};
export {
$ as CardMapDoctor
};
//# sourceMappingURL=index.es28.js.map