"use client"; import { ArrowRightLeft, Landmark, Layers, MoveRight, Workflow } from "lucide-react"; import { CurrencyIcon } from "@/components/converter/currency-icon"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import type { AssetType } from "@/lib/assets"; import { cn } from "@/lib/utils"; interface PopularPair { from: string; to: string; fromType: AssetType; toType: AssetType; } const popularPairs: PopularPair[] = [ { from: "USD", to: "PLN", fromType: "fiat", toType: "fiat" }, { from: "EUR", to: "GBP", fromType: "fiat", toType: "fiat" }, { from: "USD", to: "BTC", fromType: "fiat", toType: "crypto" }, { from: "BTC", to: "USD", fromType: "crypto", toType: "fiat" }, { from: "ETH", to: "SOL", fromType: "crypto", toType: "crypto" }, { from: "XMR", to: "BTC", fromType: "crypto", toType: "crypto" }, { from: "LTC", to: "BTC", fromType: "crypto", toType: "crypto" }, { from: "CHF", to: "JPY", fromType: "fiat", toType: "fiat" } ]; const howItWorks = [ "Fiat rates are fetched from Frankfurter with USD as the common quote.", "Crypto prices are fetched from CoinGecko in USD.", "Any pair is converted through normalized USD-per-unit pricing." ]; const supportedAssets = [ { title: "Fiat currencies", description: "Supports a broad list of global government-issued currencies, including major and regional pairs." }, { title: "Cryptocurrencies", description: "Includes leading crypto assets such as BTC, ETH, LTC, XMR, SOL, USDT, and more." }, { title: "Cross-market pairs", description: "Convert fiat-to-crypto, crypto-to-fiat, and crypto-to-crypto in one unified experience." } ]; interface InsightsSectionProps { selectedFromCode: string; selectedToCode: string; onSelectPopularPair: (fromCode: string, toCode: string) => void; } export function InsightsSection({ selectedFromCode, selectedToCode, onSelectPopularPair }: InsightsSectionProps) { return (
Popular conversions {popularPairs.map((pair) => { const isActive = pair.from === selectedFromCode && pair.to === selectedToCode; return ( ); })} How it works {howItWorks.map((line) => (

{line}

))}
Supported asset types {supportedAssets.map((item) => (

{item.title}

{item.description}

))}
); }