--- import { getMessages } from '../../i18n/messages.ts'; interface Props { locale: string; /** Unique per diagram on the page; prefixes ids inside the SVG. */ uid: string; } const { locale, uid } = Astro.props; const t = getMessages(locale); const arrowId = `${uid}-cort-arrow`; // Both states show the left atrium and left ventricle while the ventricle fills: the mitral // leaflets are open and normal in both. The atrium is an ellipse (centre 150,100; radii 100 × 60); // the mitral annulus spans x = 120–180 at y = 177. // Four pulmonary veins enter the top of the atrium; each ends at the atrial wall. const veins = [ { x: 95, end: 52 }, { x: 120, end: 45 }, { x: 180, end: 45 }, { x: 205, end: 52 }, ]; const openLeaflets = ['M120,177 Q123,202 127,226', 'M180,177 Q177,202 173,226']; // Normal: one chamber; blood goes straight down through the open mitral valve. const normalColumns = [130, 150, 170]; // Cor triatriatum: an oblique membrane from wall to wall below the vein openings, with one narrow // opening (x 143–157). The veins drain into the upper chamber; blood converges on the opening and // passes into the lower chamber, which leads to the mitral valve. The veins are not dilated. const membrane = ['M54,107.8 L143,100.6', 'M157,99.4 L246,92.2']; const converging = [ 'M95,58 C95,84 140,86 148,96', 'M120,52 C120,80 146,86 149,96', 'M180,52 C180,80 154,86 151,96', 'M205,58 C205,84 160,86 152,96', ]; const jet = 'M150,98 L150,256'; --- {veins.map((v) => ( ))} {normalColumns.map((x) => ( ))} {converging.map((d) => ( ))} {membrane.map((d) => ( ))} {openLeaflets.map((d) => ( ))} {veins.map((v) => ( ))} {normalColumns.map((x) => ( ))} {converging.map((d) => ( ))} {t['diagram.label.pulmonaryVeins']} {t['diagram.label.la']} {t['diagram.label.upper-chamber']} {t['diagram.label.membrane']} {t['diagram.label.lower-chamber']} {t['diagram.label.narrow-opening']} {t['diagram.label.mitral-valve']} {t['diagram.label.lv']}