"use client"; import type { CommercialBundle } from "../types"; import { Badge, Button } from "@/components/ui"; export function BundleCard({ bundle, onSelect, selected, recommendationScore, }: { bundle: CommercialBundle; onSelect?: () => void; selected?: boolean; recommendationScore?: number; }) { const features = bundle.feature_refs?.length ? bundle.feature_refs : bundle.capability_codes || []; return (

{bundle.display_name}

{bundle.description ? (

{bundle.description}

) : null}
{bundle.recommendation_badge ? ( {bundle.recommendation_badge} ) : null} {bundle.trial_eligible ? Trial : null} {typeof recommendationScore === "number" ? ( امتیاز {recommendationScore} ) : null}

{bundle.bundle_code}

{bundle.product_codes?.length ? (

محصولات: {bundle.product_codes.join("، ")}

) : null} {features.length ? (

ویژگی‌ها: {features.slice(0, 12).join("، ")} {features.length > 12 ? "…" : ""}

) : null} {bundle.pricing_refs?.length ? (

قیمت‌گذاری: {bundle.pricing_refs.join("، ")}

) : null} {bundle.discount_refs?.length ? (

تخفیف: {bundle.discount_refs.join("، ")}

) : null} {bundle.upgrade_path_code ? (

مسیر ارتقا: {bundle.upgrade_path_code}

) : null} {onSelect ? ( ) : null}
); }