"use client"; import { Plus, Trash2 } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Checkbox } from "@/components/ui/checkbox"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Textarea } from "@/components/ui/textarea"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@/components/ui/select"; const CIVILIAN_PRESENCE = ["None", "Low", "Medium", "High"] as const; const INFIL_EXFIL_METHODS = [ { value: "helicopter", label: "Helicopter" }, { value: "aircraft", label: "Aircraft" }, { value: "paradrop", label: "HALO / Paradrop" }, { value: "boat", label: "Boat" }, { value: "car", label: "Car" }, { value: "onFoot", label: "On Foot" }, ] as const; export interface SideOpNarrative { briefing: { sectionName: string; details: string }[]; missionObjectives: { title: string; description: string; missionCritical: boolean; successOrFailConditions: string; redacted: boolean; }[]; civilianPresence: string; radioPlan: string; insertion: string[]; extraction: string[]; assetsAvailable: { assetType: string; assetCount: string; doesRespawn: boolean; assetCallsign: string; }[]; } interface SideOpNarrativeFieldsProps { value: SideOpNarrative; onChange: (next: SideOpNarrative) => void; } function toggleValue(list: string[], value: string): string[] { return list.includes(value) ? list.filter((v) => v !== value) : [...list, value]; } export function SideOpNarrativeFields({ value, onChange }: SideOpNarrativeFieldsProps) { const setBriefing = (briefing: SideOpNarrative["briefing"]) => onChange({ ...value, briefing }); const setObjectives = (missionObjectives: SideOpNarrative["missionObjectives"]) => onChange({ ...value, missionObjectives }); const setAssets = (assetsAvailable: SideOpNarrative["assetsAvailable"]) => onChange({ ...value, assetsAvailable }); return (

Plain text only — each line becomes a paragraph. Rich formatting written in the admin panel is flattened if you save here.

{value.briefing.map((entry, i) => (
{ const next = [...value.briefing]; next[i] = { ...entry, sectionName: e.target.value }; setBriefing(next); }} placeholder="Section name (e.g. Situation)" />