import React, { useState } from "react"; import { Check, CheckCircle2, Copy, Settings, User } from "lucide-react"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Card } from "@/components/ui/card"; import { cn } from "@/lib/utils"; // --------------------------------------------------------------------------- // IntegrationServiceCard // --------------------------------------------------------------------------- export type IntegrationServiceCardProps = { title: string; imageUrl?: string; iconNode?: React.ReactNode; description: string; isConnected: boolean; /** Not yet available — shows a "Coming Soon" badge and disables the * connect click-through. */ isComingSoon?: boolean; onCardClick: () => void; onSettingsClick: () => void; className?: string; }; export function IntegrationServiceCard({ title, imageUrl, iconNode, description, isConnected, isComingSoon = false, onCardClick, onSettingsClick, className, }: IntegrationServiceCardProps) { const isClickable = !isConnected && !isComingSoon; return (
{iconNode ? ( img]:size-6 [&>svg]:size-6", isComingSoon && "opacity-60", )} > {iconNode} ) : ( {imageUrl && } )}
{title} {isConnected && ( Connected )} {!isConnected && isComingSoon && ( Coming Soon )}
{isConnected && ( )}

{description}

); } // --------------------------------------------------------------------------- // IntegrationInstructionCard // --------------------------------------------------------------------------- export type IntegrationInstructionCardProps = { title: string; codeBlock: string; onCopy?: () => void; className?: string; }; export function IntegrationInstructionCard({ title, codeBlock, onCopy, className, }: IntegrationInstructionCardProps) { const [copied, setCopied] = useState(false); const handleCopy = async () => { try { await navigator.clipboard.writeText(codeBlock); setCopied(true); onCopy?.(); setTimeout(() => setCopied(false), 2000); } catch { // clipboard unavailable (non-HTTPS or permissions denied) } }; return (

{title}

        {codeBlock}
      
); }