UNPKG

@anoki/fse-ui

Version:

FSE UI components library

117 lines (116 loc) 3.71 kB
import { j as e } from "./index.es180.js"; import './components/ui/CardMapDoctor/CardMapDoctor.css';/* empty css */ import { useState as C, useRef as v } from "react"; import { Root as g, Indicator as b } from "./index.es219.js"; import { useClickOutside as k } from "./index.es220.js"; import { Row as y } from "./index.es9.js"; import { Col as c } from "./index.es10.js"; const $ = ({ titleTag: x = "h3", availableLabel: p = "Disponibile", specialization: h = "-", href: m = "/", addressLabel: f, linkLabel: t = "Apri dettaglio", asLink: o = "a", className: u, doctor: s, setSelectedCard: l = () => { }, keepSelectionOnNavigation: d = !1 }) => { const w = o, [a, n] = C(!1), r = v(null), i = s == null ? void 0 : s.offices[0]; k( r, a, () => n(!1), () => l(""), d ); const j = /* @__PURE__ */ e.jsx( w, { className: "text-decoration-none fs-7 fw-bold text-primary", href: m, children: t == null ? void 0 : t.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} ${a ? "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( g, { id: s == null ? void 0 : s.code, checked: a, 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: h }), /* @__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: p.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