Compose Omnichannel Social Post / Status
{/* Target Selector */}
Publishing Channels
{ setPublishTarget('all'); setPreviewPlatform('instagram'); }}
className={`flex flex-col items-center justify-center p-3 crm-radius-control border text-xs font-semibold transition gap-1.5 cursor-pointer ${
publishTarget === 'all' ? channelSelected : channelIdle
}`}
>
All 3 Channels
{ setPublishTarget('whatsapp'); setPreviewPlatform('whatsapp'); }}
className={`flex flex-col items-center justify-center p-3 crm-radius-control border text-xs font-semibold transition gap-1.5 cursor-pointer ${
publishTarget === 'whatsapp' ? channelSelected : channelIdle
}`}
>
WhatsApp Status
{ setPublishTarget('instagram'); setPreviewPlatform('instagram'); }}
className={`flex flex-col items-center justify-center p-3 crm-radius-control border text-xs font-semibold transition gap-1.5 cursor-pointer ${
publishTarget === 'instagram' ? channelSelected : channelIdle
}`}
>
Instagram Only
{ setPublishTarget('facebook'); setPreviewPlatform('facebook'); }}
className={`flex flex-col items-center justify-center p-3 crm-radius-control border text-xs font-semibold transition gap-1.5 cursor-pointer ${
publishTarget === 'facebook' ? channelSelected : channelIdle
}`}
>
Facebook Only
{/* Real Media Upload & Source */}
Media Attachment (Image / Video)
setMediaType('IMAGE')}
className={`px-2 py-0.5 text-[11px] font-semibold crm-radius-badge transition cursor-pointer ${
mediaType === 'IMAGE' ? 'bg-primary text-white' : 'text-muted-foreground'
}`}
>
Image
setMediaType('VIDEO')}
className={`px-2 py-0.5 text-[11px] font-semibold crm-radius-badge transition cursor-pointer ${
mediaType === 'VIDEO' ? 'bg-primary text-white' : '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="h-8 px-2.5 text-[12px] font-medium crm-radius-control bg-card border border-border hover:bg-muted text-foreground transition cursor-pointer"
>
Replace
) : (
fileInputRef.current?.click()}
className="cursor-pointer border border-dashed border-border hover:border-primary crm-radius-control 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 h-9 px-3 text-[13px] crm-radius-control bg-card border border-border focus:outline-none focus:border-primary text-foreground"
/>
{/* 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 crm-radius-control border text-center transition cursor-pointer ${
selectedFilter === f.name
? 'border-primary bg-primary/10'
: 'border-border bg-card hover:bg-muted'
}`}
>
{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()}`
}