UNPKG

@anoki/fse-marche-ui

Version:

FSE UI components library

3 lines (2 loc) 2.72 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/CardMapDoctor/CardMapDoctor.css');const e=require("./index.cjs137.js");;/* empty css */const l=require("react"),c=require("./index.cjs170.js"),g=require("./index.cjs171.js"),N=require("./index.cjs9.js"),u=require("./index.cjs10.js"),v=({titleTag:o="h3",availableLabel:p="Disponibile",specialization:m="Medico di famiglia | Neurologia",href:j="/",addressLabel:h,linkLabel:i="Apri dettaglio",asLink:d="a",className:f,doctor:s,setSelectedCard:x=()=>{},keepSelectionOnNavigation:R=!1})=>{const w=d,[n,r]=l.useState(!1),a=l.useRef(null),t=s==null?void 0:s.offices[0];g.useClickOutside(a,n,()=>r(!1),()=>x(""),R);const E=e.jsxRuntimeExports.jsx(w,{className:"text-decoration-none fs-7 fw-bold text-primary",href:j,children:i==null?void 0:i.toUpperCase()}),C=()=>e.jsxRuntimeExports.jsx("svg",{width:"14",height:"14",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:e.jsxRuntimeExports.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});return e.jsxRuntimeExports.jsxs(N.Row,{br:"x4",p:"x24",gap:"x16",bg:"white",text:"slate-20",ref:a,className:`${f} ${n?"ui-is-active ui-card-search":"ui-card-search"} shadow cursor-pointer`,onClick:()=>{r(!0),x(s==null?void 0:s.code)},children:[e.jsxRuntimeExports.jsx(c.Root,{id:s==null?void 0:s.code,checked:n,className:"ui-checkbox-filter",children:e.jsxRuntimeExports.jsx(c.Indicator,{children:e.jsxRuntimeExports.jsx(C,{})})}),e.jsxRuntimeExports.jsxs(u.Col,{justifyContent:"center",className:"w-full",children:[e.jsxRuntimeExports.jsxs(u.Col,{pb:"x16",children:[e.jsxRuntimeExports.jsxs(o,{className:"flex-1 text-decoration-none fs-4 fw-semibold",children:["Dott. ",s==null?void 0:s.firstName," ",s==null?void 0:s.lastName]}),e.jsxRuntimeExports.jsx("p",{className:"fs-6 fw-regular text-slate-28",children:m}),e.jsxRuntimeExports.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()})]}),e.jsxRuntimeExports.jsxs("div",{className:"text-slate-28 fs-6",children:[e.jsxRuntimeExports.jsx("div",{className:"fw-bold",children:h}),e.jsxRuntimeExports.jsx("div",{className:"w-full",children:e.jsxRuntimeExports.jsxs("p",{className:"fw-regular",children:[t!=null&&t.address?t.address.charAt(0).toUpperCase()+t.address.slice(1).toLowerCase():"",","," ",t!=null&&t.city?t.city.charAt(0).toUpperCase()+t.city.slice(1).toLowerCase():""]})}),e.jsxRuntimeExports.jsx("div",{className:"pt-x8",children:E})]})]})]})};exports.CardMapDoctor=v; //# sourceMappingURL=index.cjs28.js.map