import React, { useState } from 'react'; import { motion } from 'framer-motion'; import { Save, Send, Eye, Calendar, Clock, Image, Layers, FileText, Video, Sparkles, ChevronDown, Plus, X, GripVertical, RefreshCw, ThumbsUp, MessageCircle, Share2, MoreHorizontal, Globe, Link2, Hash, AtSign, Bold, Italic, List, Smile, ImagePlus, Trash2, ArrowLeft, Linkedin } from 'lucide-react'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { Textarea } from '@/components/ui/textarea'; import { Badge } from '@/components/ui/badge'; import { Label } from '@/components/ui/label'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'; import { Separator } from '@/components/ui/separator'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from '@/components/ui/select'; import { Popover, PopoverContent, PopoverTrigger, } from '@/components/ui/popover'; import { Calendar as CalendarComponent } from '@/components/ui/calendar'; import { format } from 'date-fns'; import { Link } from 'react-router-dom'; import { createPageUrl } from '@/utils'; const postTypes = [ { id: 'carousel', name: 'Carousel', icon: Layers }, { id: 'cover_content', name: 'Cover Image + Content', icon: Image }, { id: 'content_only', name: 'Content Only', icon: FileText }, { id: 'webinar', name: 'Webinar Invite', icon: Video }, ]; const products = [ { id: 'ocr', name: 'Document Parsing (OCR)', shortName: 'OCR' }, { id: 'p2p', name: 'Purchase To Pay', shortName: 'P2P' }, { id: 'o2c', name: 'Order to Cash', shortName: 'O2C' }, ]; export default function PostEditor() { const [postType, setPostType] = useState('carousel'); const [product, setProduct] = useState('ocr'); const [content, setContent] = useState(`🚀 Transform Your Document Processing with AI-Powered OCR Are you still manually processing invoices and documents? Here's how our Intelligent Document Parsing solution can revolutionize your workflow: ✅ 99.5% accuracy in data extraction ✅ Process 1000+ documents per hour ✅ Seamless integration with existing systems ✅ Reduce manual errors by 95% The future of document automation is here. Ready to transform your business? #DocumentAutomation #OCR #AITechnology #DigitalTransformation #BusinessEfficiency`); const [scheduledDate, setScheduledDate] = useState(new Date()); const [scheduledTime, setScheduledTime] = useState('10:00'); const [carouselSlides, setCarouselSlides] = useState([ { id: 1, title: 'Slide 1', hasImage: true }, { id: 2, title: 'Slide 2', hasImage: true }, { id: 3, title: 'Slide 3', hasImage: true }, ]); const [selectedAssets, setSelectedAssets] = useState([ { id: 1, name: 'OCR_Demo.png', type: 'image' }, { id: 2, name: 'Workflow_Diagram.png', type: 'image' }, ]); const addSlide = () => { setCarouselSlides([...carouselSlides, { id: Date.now(), title: `Slide ${carouselSlides.length + 1}`, hasImage: false }]); }; const removeSlide = (id) => { setCarouselSlides(carouselSlides.filter(slide => slide.id !== id)); }; return (
Compose and schedule your LinkedIn content
{slide.hasImage ? 'Image attached' : 'No image'}
Alex Business
Marketing Director at TechCorp
{format(scheduledDate, 'MMM d')} •
{carouselSlides.length} slides