// EventiScreen — the directory. FilterBar + result grid.
function EventiScreen({ go }) {
const NS = window.EventiVinoMilanoDesignSystem_98fdb6;
const { EventCard, Breadcrumb, Tag, Button } = NS;
const Icon = window.EVMIcon;
const { events } = window.EVM_DATA;
const cats = ['Tutti', 'Degustazioni', 'Masterclass', 'Cene con produttore', 'Verticali', "Banchi d'assaggio", 'Wine event'];
const [cat, setCat] = React.useState('Tutti');
const [q, setQ] = React.useState('');
const filtered = events.filter((e) =>
(cat === 'Tutti' || e.type === cat) &&
(q === '' || (e.title + e.location + e.type).toLowerCase().includes(q.toLowerCase())));
return (
Tutti gli eventi del vino in Lombardia
Filtra per città, data e tipologia. Aggiornato ogni settimana.
{/* Controls */}
setQ(e.target.value)} placeholder="Cerca eventi, degustazioni, cantine…" aria-label="Cerca"
style={{ flex: 1, border: 'none', background: 'transparent', outline: 'none', fontFamily: 'var(--font-sans)', fontSize: 'var(--fs-body)', color: 'var(--charcoal)' }} />
{cats.map((c) =>
setCat(c)}>{c})}
{filtered.length} eventi trovati
{filtered.map((e) => go('EventDetail', e.id)} style={{ cursor: 'pointer' }} />)}
{filtered.length === 0 &&
Nessun evento per questi filtri. Prova ad allargare la ricerca.
}
);
}
const selStyle = { appearance: 'none', background: 'var(--cream)', border: '1px solid var(--border-subtle)', borderRadius: 'var(--radius-pill)', padding: '8px 16px', fontFamily: 'var(--font-sans)', fontSize: 'var(--fs-sm)', color: 'var(--charcoal)', cursor: 'pointer' };
window.EventiScreen = EventiScreen;