import { useState, useEffect } from "react"; const DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; const MONTHS = ["January","February","March","April","May","June","July","August","September","October","November","December"]; const CONTENT_TYPES = ["Reel", "Carousel", "Story", "Static Post", "Collab", "Live"]; const STATUS_OPTIONS = ["Idea", "Draft", "In Review", "Scheduled", "Posted"]; const PILLARS = ["Education", "Entertainment", "Promotion", "Community", "Behind the Scenes", "User Generated"]; const TYPE_COLORS = { "Reel": "#FF6B6B", "Carousel": "#FFD93D", "Story": "#6BCB77", "Static Post": "#4D96FF", "Collab": "#C77DFF", "Live": "#FF9F1C", }; const STATUS_COLORS = { "Idea": "#666", "Draft": "#FF9F1C", "In Review": "#4D96FF", "Scheduled": "#C77DFF", "Posted": "#6BCB77", }; const PILLAR_COLORS = { "Education": "#4D96FF", "Entertainment": "#FF6B6B", "Promotion": "#FFD93D", "Community": "#6BCB77", "Behind the Scenes": "#FF9F1C", "User Generated": "#C77DFF", }; function getToday() { return new Date(); } function getDaysInMonth(year, month) { return new Date(year, month + 1, 0).getDate(); } function getFirstDayOfMonth(year, month) { return new Date(year, month, 1).getDay(); } const initialPosts = [ { id: 1, title: "Morning Routine Reel", caption: "Start your day right ✨ Here's my 5am morning routine...", type: "Reel", pillar: "Education", status: "Scheduled", date: "2026-05-05", time: "08:00", hashtags: "#morningroutine #wellness #selfcare", notes: "Record b-roll of coffee & journal", engagementGoal: "500 likes", }, { id: 2, title: "Product Launch Carousel", caption: "Swipe to see what's dropping this week 👀", type: "Carousel", pillar: "Promotion", status: "Draft", date: "2026-05-08", time: "12:00", hashtags: "#newproduct #launch #shopnow", notes: "Need final images from designer", engagementGoal: "200 saves", }, { id: 3, title: "Behind the Scenes Story", caption: "Ever wonder what goes into making content?", type: "Story", pillar: "Behind the Scenes", status: "Idea", date: "2026-05-12", time: "18:00", hashtags: "#bts #contentcreator", notes: "", engagementGoal: "100 replies", }, ]; function PostModal({ post, onClose, onSave, onDelete, mode }) { const [form, setForm] = useState(post || { title: "", caption: "", type: "Reel", pillar: "Education", status: "Idea", date: "", time: "12:00", hashtags: "", notes: "", engagementGoal: "" }); const update = (k, v) => setForm(f => ({ ...f, [k]: v })); return (
{/* Modal Header */}
{mode === "new" ? "✦ New Post" : "✦ Edit Post"}
{/* Title */}
update("title", e.target.value)} placeholder="e.g. Morning Routine Reel" style={inputStyle} />
{/* Type + Pillar */}
{/* Date + Time + Status */}
update("date", e.target.value)} style={inputStyle} />
update("time", e.target.value)} style={inputStyle} />
{/* Caption */}