import React, { useState } from 'react'; import { motion } from 'framer-motion'; import { Link2, Check, X, ExternalLink, Settings, RefreshCw, Shield, Key, AlertCircle, CheckCircle, Linkedin, Palette, Zap, ArrowRight, Info, Save } from 'lucide-react'; import { Card, CardContent, CardHeader, CardTitle, CardDescription } from '@/components/ui/card'; import { Button } from '@/components/ui/button'; import { Badge } from '@/components/ui/badge'; import { Switch } from '@/components/ui/switch'; import { Label } from '@/components/ui/label'; import { Input } from '@/components/ui/input'; import { Separator } from '@/components/ui/separator'; import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger, DialogDescription, } from '@/components/ui/dialog'; import { Alert, AlertDescription, AlertTitle, } from '@/components/ui/alert'; const integrations = [ { id: 'linkedin', name: 'LinkedIn', description: 'Connect your LinkedIn account to schedule and publish posts directly', icon: Linkedin, color: 'blue', bgColor: 'bg-[#0A66C2]', connected: true, account: 'alex.business@company.com', lastSync: '2 mins ago', features: [ 'Schedule posts up to 60 days in advance', 'Publish carousel, image, and text posts', 'Track post performance analytics', 'Manage multiple company pages' ] }, { id: 'canva', name: 'Canva', description: 'Import designs directly from your Canva workspace for post visuals', icon: Palette, color: 'purple', bgColor: 'bg-gradient-to-br from-[#00C4CC] to-[#7B2FF7]', connected: false, account: null, lastSync: null, features: [ 'Browse and import Canva designs', 'Access brand kit assets', 'Import templates for carousels', 'Sync design updates automatically' ] }, ]; export default function Integrations() { const [linkedInDialogOpen, setLinkedInDialogOpen] = useState(false); const [canvaDialogOpen, setCanvaDialogOpen] = useState(false); const [autoPost, setAutoPost] = useState(true); const [notifications, setNotifications] = useState(true); return (
{/* Header */}

Integrations

Connect your tools to streamline your content workflow

{/* Integration Status Banner */} Quick Setup Connect both LinkedIn and Canva to unlock the full potential of automated content scheduling. Your designs will flow seamlessly to your LinkedIn audience. {/* Integration Cards */}
{integrations.map((integration, index) => (
{/* Left Section - Integration Info */}

{integration.name}

{integration.connected ? ( Connected ) : ( Not Connected )}

{integration.description}

{integration.connected && (
{integration.account}
Synced {integration.lastSync}
)}
{/* Features */}

Features

{integration.features.map((feature, idx) => (
{feature}
))}
{/* Right Section - Actions */}
{integration.connected ? (
{integration.name} Settings
Configure your {integration.name} integration preferences

Automatically publish posts at scheduled times

Get notified when posts are published

{integration.account}

Connected

) : (
Connect to {integration.name}
Authorize access to your {integration.name} account

Secure Connection

Your credentials are encrypted and never stored. We only request necessary permissions.

{integration.id === 'linkedin' ? ( <>
Read and write posts on your behalf
Schedule posts for future publishing
Access post analytics and insights
) : ( <>
View your Canva designs
Download designs as images
Access brand kit assets
)}

You'll be redirected to {integration.name} to authorize

)}
))}
{/* API Configuration */} API Configuration For advanced users who want to configure custom API settings
); }