"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),h=require("react"),r=require("../../../../components/Icon/constants.cjs.js"),a=require("../../../../utils/cn/cn.cjs.js"),m=require("../../assets/company-logo.svg.cjs.js"),s=require("../../../../src/modules/Comparison/components/ComparisonMobileView/comparisonMobileView.module.css"),v=require("../../../../components/FilterMenu/FilterMenu.cjs.js"),i=require("../../../../components/Typography/Typography.cjs.js"),p=require("../../../../components/Icon/Icon.cjs.js"),o=l=>l?l.type==="string"?e.jsx(i.Typography,{defaultVariant:"bodyMd",as:"div",children:l.value}):e.jsx("div",{className:a.cn(s.iconCell,l.value?s.iconCellHighlighted:""),children:e.jsx(p.Icon,{name:l.value?r.EIconName.CHECK:r.EIconName.CLOSE,className:s.icon})}):null,x=l=>l.slice(1).map((c,n)=>({values:[{value:n+1,label:c}]})),y=({comparison:l,className:c})=>{const[n,d]=h.useState(1);return e.jsxs("div",{className:a.cn(s.root,c),children:[l.headers.length>2&&e.jsx("div",{children:e.jsx(v.FilterMenu,{options:x(l.headers),label:"Select comparison",selectedValue:n,onSelect:d})}),e.jsxs("div",{className:s.table,children:[e.jsxs("div",{className:s.headers,children:[e.jsx("div",{className:a.cn(s.cell,s.cellHighlighted),children:e.jsx(m.default,{className:s.companyLogo})}),e.jsx(i.Typography,{as:"div",defaultVariant:"bodyXl",className:s.cell,children:l.headers[n]})]}),l.rows.map((t,u)=>e.jsxs("div",{className:s.feature,children:[e.jsx(i.Typography,{defaultVariant:"bodyLg",as:"div",weight:"medium",children:t.feature}),e.jsxs("div",{className:s.row,children:[e.jsx("div",{className:s.cell,children:o(t.values[0])}),e.jsx("div",{className:s.cell,children:o(t.values[n])})]})]},`feature-${u}`))]})]})};exports.ComparisonMobileView=y;
