'use client' import * as React from 'react' import { ChevronRight } from 'lucide-react' import { cn } from '../../lib/utils' export type IntegrationStatus = 'connected' | 'available' | 'coming-soon' export interface IntegrationCardProps { name: string description: string icon: React.ElementType status: IntegrationStatus onClick?: () => void lastSync?: string className?: string } const STATUS_CONFIG: Record = { connected: { label: 'Connected', className: 'bg-green-100 text-green-700' }, available: { label: 'Available', className: 'bg-blue-100 text-blue-700' }, 'coming-soon': { label: 'Coming Soon', className: 'bg-gray-100 text-gray-500' }, } export function IntegrationCard({ name, description, icon: Icon, status, onClick, lastSync, className, }: IntegrationCardProps) { const isClickable = status !== 'coming-soon' const statusEntry = STATUS_CONFIG[status] return (
{ if (e.key === 'Enter' || e.key === ' ') { e.preventDefault() onClick?.() } } : undefined } >

{name}

{statusEntry.label}

{description}

{lastSync && (

Last synced: {lastSync}

)} {isClickable && ( Configure )}
) }