"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("../../utils/cn/cn.cjs.js"),u=require("./assets/company-logo.svg.cjs.js"),e=require("../../src/modules/Comparison/comparison.module.css"),d=require("./utils.cjs.js"),g=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),n=require("../../components/Typography/Typography.cjs.js"),p=require("../../components/Icon/Icon.cjs.js"),o=require("../../components/Icon/constants.cjs.js"),y=require("./components/ComparisonMobileView/ComparisonMobileView.cjs.js"),x=({title:m,description:c,comparison:t})=>s.jsx("div",{className:e.root,children:s.jsxs("div",{className:e.container,children:[s.jsxs("div",{className:e.header,children:[s.jsx(g.HighlightedTitle,{title:m,defaultVariant:"displayMd",mobileVariant:"headingXl"}),c&&s.jsx(n.Typography,{as:"p",defaultVariant:"bodyLg",mobileVariant:"bodySm",className:e.description,children:c})]}),s.jsxs("div",{className:e.table,style:{gridTemplateColumns:`minmax(220px, 1fr) repeat(${t.headers.length}, minmax(220px, 270px))`},children:[s.jsx("div",{className:i.cn(e.emptyCell,e.stickyCell)}),s.jsx("div",{className:i.cn(e.otherEmptyCells)}),s.jsx(n.Typography,{defaultVariant:"bodyXl",as:"div",className:i.cn(e.cell,e.cellFeature,e.stickyCell),weight:"medium",children:"Features"}),t.headers.map(a=>s.jsx(n.Typography,{as:"div",defaultVariant:t.headers.length>2?"bodyXl":"headingLg",className:i.cn(e.cell,d.isHealthspan(a)?e.cellHighlighted:""),weight:t.headers.length>2?"medium":"regular",children:d.isHealthspan(a)?s.jsx(u.default,{className:e.companyLogo}):a},a)),t.rows.map((a,h)=>s.jsxs(s.Fragment,{children:[s.jsx("div",{className:i.cn(e.cell,e.cellFeature,e.stickyCell),children:s.jsxs("div",{className:e.featureContent,children:[s.jsx(n.Typography,{defaultVariant:"bodyXl",weight:"medium",children:a.feature}),a.description&&s.jsx(n.Typography,{defaultVariant:"bodyXl",className:e.featureDescription,children:a.description})]})},`feature-${a.feature}`),t.headers.map((j,r)=>{const l=a.values[r];return s.jsxs("div",{className:i.cn(e.cell,r?"":e.cellHighlighted),children:[(l==null?void 0:l.type)==="boolean"&&s.jsx("div",{className:i.cn(e.booleanValue,!r&&l.value?e.booleanValueHighlighted:""),children:s.jsx(p.Icon,{name:l.value?o.EIconName.CHECK:o.EIconName.CLOSE})}),(l==null?void 0:l.type)==="string"&&s.jsx(n.Typography,{defaultVariant:"bodyXl",weight:"medium",className:e.stringValue,children:l.value})]},`value-${h}-${l.value}`)})]})),s.jsx("div",{className:i.cn(e.emptyCell,e.stickyCell)}),s.jsx("div",{className:i.cn(e.otherEmptyCells)}),s.jsx("div",{className:e.gradientBackground})]}),s.jsx(y.ComparisonMobileView,{comparison:t})]})});exports.Comparison=x;
