Compose Omnichannel Social Post / Status
{/* Target Selector */}
Publishing Channels
{ setPublishTarget('all'); setPreviewPlatform('instagram'); }}
className={`flex flex-col items-center justify-center p-3 rounded-xl border text-xs font-semibold transition gap-1.5 ${
publishTarget === 'all'
? 'bg-primary/10 border-primary text-primary shadow-xs ring-1 ring-primary/40'
: 'border-border/80 text-muted-foreground hover:bg-muted/50'
}`}
>
All 3 Channels
{ setPublishTarget('whatsapp'); setPreviewPlatform('whatsapp'); }}
className={`flex flex-col items-center justify-center p-3 rounded-xl border text-xs font-semibold transition gap-1.5 ${
publishTarget === 'whatsapp'
? 'bg-emerald-500/15 border-emerald-500 text-emerald-600 dark:text-emerald-400 shadow-xs ring-1 ring-emerald-500/40'
: 'border-border/80 text-muted-foreground hover:bg-muted/50'
}`}
>
WhatsApp Status
{ setPublishTarget('instagram'); setPreviewPlatform('instagram'); }}
className={`flex flex-col items-center justify-center p-3 rounded-xl border text-xs font-semibold transition gap-1.5 ${
publishTarget === 'instagram'
? 'bg-pink-500/15 border-pink-500 text-pink-600 dark:text-pink-400 shadow-xs ring-1 ring-pink-500/40'
: 'border-border/80 text-muted-foreground hover:bg-muted/50'
}`}
>
Instagram Only
{ setPublishTarget('facebook'); setPreviewPlatform('facebook'); }}
className={`flex flex-col items-center justify-center p-3 rounded-xl border text-xs font-semibold transition gap-1.5 ${
publishTarget === 'facebook'
? 'bg-blue-500/15 border-blue-500 text-blue-600 dark:text-blue-400 shadow-xs ring-1 ring-blue-500/40'
: 'border-border/80 text-muted-foreground hover:bg-muted/50'
}`}
>
Facebook Only
{/* Real Media Upload & Source */}
Media Attachment (Image / Video)
setMediaType('IMAGE')}
className={`px-2 py-0.5 text-[11px] font-semibold rounded-md transition ${
mediaType === 'IMAGE' ? 'bg-primary text-primary-foreground' : 'text-muted-foreground'
}`}
>
Image
setMediaType('VIDEO')}
className={`px-2 py-0.5 text-[11px] font-semibold rounded-md transition ${
mediaType === 'VIDEO' ? 'bg-primary text-primary-foreground' : 'text-muted-foreground'
}`}
>
Video / Reel
{/* Upload Dropzone / Action Bar */}
{mediaUrl ? (
{mediaType === 'VIDEO' ? (
) : (
)}
{uploadedFileName || mediaUrl.split('/').pop() || 'Attached Media'}
{mediaType} • Ready to publish
fileInputRef.current?.click()}
disabled={isUploading}
className="px-2.5 py-1 text-xs font-medium rounded-lg bg-card border border-border hover:bg-muted text-foreground transition"
>
Replace
) : (
fileInputRef.current?.click()}
className="cursor-pointer border-2 border-dashed border-border/80 hover:border-primary/60 rounded-xl p-5 flex flex-col items-center justify-center text-center transition group bg-muted/20 hover:bg-muted/40"
>
{isUploading ? (
) : (
)}
{isUploading ? 'Uploading Media...' : 'Click to upload image or video'}
Supports JPG, PNG, WEBP, MP4, MOV (up to 50MB)
)}
{/* Direct URL input fallback */}
{
setMediaUrl(e.target.value);
setUploadedFileName('');
}}
placeholder="Or paste external media URL (https://... or /uploads/...)"
className="w-full px-3 py-1.5 text-xs rounded-xl bg-muted/40 border border-border/70 focus:outline-none focus:ring-1 focus:ring-primary text-foreground font-mono"
/>
{/* Caption Textarea - Clean, No Static Text */}
Post Caption & WhatsApp Status Text
{caption.length} / 2200 chars
{/* 17 Instagram Filters Carousel - Dynamic Swatches */}
17 Visual Filter Presets
{selectedFilter !== 'Normal' && (
setSelectedFilter('Normal')}
className="text-[10px] font-semibold text-primary hover:underline"
>
Reset Filter
)}
{INSTAGRAM_FILTERS.map((f) => (
setSelectedFilter(f.name)}
className={`flex-shrink-0 flex flex-col items-center gap-1.5 p-2 rounded-xl border text-center transition ${
selectedFilter === f.name
? 'border-primary bg-primary/10 shadow-xs'
: 'border-border/80 bg-card hover:bg-muted/50'
}`}
>
{(!mediaUrl || mediaType === 'VIDEO') && (
)}
{f.name}
))}
{/* Publish CTA Button */}
{publishing ? (
) : (
)}
{publishing
? 'Publishing Across Channels...'
: publishTarget === 'all'
? 'Publish to All 3 Channels (IG + FB + WA)'
: publishTarget === 'whatsapp'
? 'Publish to WhatsApp Status'
: `Publish to ${publishTarget.toUpperCase()}`
}