"use client"; import type { TenantRecommendationFeed } from "../adapters/tenant-recommendations"; import type { AdapterResult } from "../types"; import { CommercialEmptyState } from "./CommercialEmptyState"; import { commercialEntityName, recommendationReason } from "../presentation"; function RecList({ title, items, kind, }: { title: string; items?: Array<{ code: string; score?: number; reason?: string; kind?: string }>; kind: string; }) { if (!items?.length) return null; return (

{title}

); } export function RecommendationsPanel({ result, }: { result: AdapterResult | null; }) { if (!result || result.availability !== "ready") { return ( ); } const d = result.data; return (
({ ...item, kind: "bundles" })), ...(d.recommended_services || []).map((item) => ({ ...item, kind: "products" })), ].slice(0, 4)} /> ({ ...item, kind: "products" })), ...(d.recommended_automation_packs || []).map((item) => ({ ...item, kind: "automation-packs" })), ...(d.recommended_extensions || []).map((item) => ({ ...item, kind: "extensions" })), ].slice(0, 4)} />
); }