import cx from "classnames";
import React from "react";
import ConditionalWrapper from "../../utils/ConditionalWrapper";
import { Bar, BarItem } from "../Bar";
import { IconButton } from "../Button";
import { Icon } from "../Icon";
import { Image } from "../Image";
import { Tag } from "../Tag";
import { InfoTooltip } from "../Tooltip/InfoTooltip";
import type { Item } from "./generateTotal";
import Price from "./Price";
export interface Labels {
[key: string]: string;
remove: string;
add: string;
free: string;
upfront: string;
monthly: string;
}
export interface Row extends Item {
description?: string | string[];
}
interface RowResult {
col1: React.ReactNode;
col2: React.ReactNode;
col3: React.ReactNode;
col4?: React.ReactNode;
}
const generateRow = (
row: Row,
isEditable: boolean,
labels: Labels,
): RowResult => {
const {
isSubitem,
image,
badge,
// type,
name,
tooltip,
price,
discount,
description,
icon,
isMandatory,
isOptional,
} = row;
return {
col1: (
<>
{text}
{`1. – ${discount.monthsCount}. mesiac`}