import React from 'react'; import { motion } from 'framer-motion'; const NarrativeSection = ({ narrative, vibe }) => { if (!narrative) return null; const persona = narrative.persona || "THE UNKNOWN LISTENER"; const vibeCheckShort = narrative.vibe_check_short || narrative.vibe_check?.substring(0, 120) + "..." || "Analyzing auditory aura..."; const getTags = () => { if (!vibe) return []; const tags = []; const valence = vibe.valence || 0; const energy = vibe.energy || 0; const danceability = vibe.danceability || 0; if (valence > 0.6) tags.push({ text: "HIGH VALENCE", color: "primary" }); else if (valence < 0.4) tags.push({ text: "MELANCHOLIC", color: "accent-purple" }); if (energy > 0.6) tags.push({ text: "HIGH ENERGY", color: "accent-neon" }); else if (energy < 0.4) tags.push({ text: "CHILL VIBES", color: "accent-purple" }); if (danceability > 0.7) tags.push({ text: "DANCEABLE", color: "primary" }); return tags.slice(0, 3); }; const tags = getTags(); if (tags.length === 0) { tags.push({ text: "ECLECTIC", color: "primary" }); tags.push({ text: "MYSTERIOUS", color: "accent-purple" }); } return (

{persona}

{vibeCheckShort}
{tags.map((tag, i) => ( {tag.text} ))}
); }; export default NarrativeSection;