UNPKG

@hhgtech/hhg-components

Version:
71 lines (68 loc) 3.29 kB
import { _ as __rest } from './tslib.es6-00ab44b2.js'; import React__default from 'react'; import { u as useTranslations } from './index-09d9e570.js'; import { C as CommonGAssets } from './index-7adf994c.js'; import { c as formatUserProfileUrl } from './dataTransform-60f9d527.js'; import { H as HealthToolCardWrapper } from './index-76c27a99.js'; import { T as ThrForm } from './index-a19a47a8.js'; import './translationsContext-18f7b7e0.js'; import './constantsDomainLocales.js'; import './Locale-dc1237b9.js'; import './constantsIsProduction.js'; import '@mantine/core'; import '@hhgtech/icons/core'; import '@hhgtech/icons/other'; import './index-bd44bcb2.js'; import '@mantine/hooks'; import './index-17c85f76.js'; import './index-50aea2c8.js'; import './utils-538169b3.js'; import '@emotion/styled'; import '@mantine/carousel'; import './index-0b67696c.js'; import './index-3f09210d.js'; import 'dayjs'; import './index-fe4471f4.js'; import '@mantine/notifications'; import './index-8c40504a.js'; import 'date-fns/locale'; import './constantsSite.js'; import './constantsRiskScreener.js'; import './miscTheme.js'; import './shared-b07d1eb2.js'; import 'classnames'; import 'uuid'; import './useUniqueId-38cdf062.js'; import '@emotion/react'; import './index-2d25b0f0.js'; import '@mantine/dates'; import './index.styles-3adef5f6.js'; import './index-04505e35.js'; import './context-41a96757.js'; import '@mantine/form'; import './useHealthToolCache-795263ae.js'; import './miscGetDynamicHealthTool.js'; import './normalizeLink-c3e1dac7.js'; import './core-536071a4.js'; import './constants-367949ba.js'; import './index-a002ff96.js'; import './index-0861b084.js'; import './index-c6190f14.js'; import 'react-keyed-flatten-children'; const THRCardEmbed = (_a) => { var _b, _c; var { thrContent, formProps } = _a, props = __rest(_a, ["thrContent", "formProps"]); const { t } = useTranslations(); return (React__default.createElement(HealthToolCardWrapper, Object.assign({}, props), React__default.createElement(HealthToolCardWrapper.Banner, { icon: React__default.createElement("img", { alt: "health-tool-icon", src: (thrContent === null || thrContent === void 0 ? void 0 : thrContent.featured_image) || CommonGAssets.getAssetPath('health-tools/target-heart-rate-icon.svg'), loading: "lazy" }), heading: (thrContent === null || thrContent === void 0 ? void 0 : thrContent.title) || t('targetHearRate.heading'), medicalReview: ((_b = thrContent === null || thrContent === void 0 ? void 0 : thrContent.reviewedBy) === null || _b === void 0 ? void 0 : _b.display_name) ? { link: formatUserProfileUrl(thrContent === null || thrContent === void 0 ? void 0 : thrContent.reviewedBy), reviewer: (_c = thrContent === null || thrContent === void 0 ? void 0 : thrContent.reviewedBy) === null || _c === void 0 ? void 0 : _c.display_name, date: thrContent === null || thrContent === void 0 ? void 0 : thrContent.reviewedDate, } : undefined }), React__default.createElement(HealthToolCardWrapper.Body, null, React__default.createElement(ThrForm, Object.assign({}, formProps))))); }; export { THRCardEmbed };