'use strict'; import * as sol from "../../solight/sol.js"; import * as serv from "../services/general.js"; const html = htm.bind(preact.h); const speaker = (event) => { const speaker = sol.eventPersons(event); const names = speaker.map(s => sol.personName(s)).join(", "); return html`${names}`; }; const event_row = (event) => html` ${sol.eventTitle(event)} ${speaker(event)} `; const talks_table = (events) => { const evs = sol.sortEventsByStartDate(events); return html`

Talks

${evs.map(e => event_row(e))}
Title Speakers
`; }; const talks_overview = (schedule) => { const events = sol.allEvents(schedule); return html`

Schedule (v ${sol.scheduleVersion(schedule)})

${talks_table(events)}`; }; const update_main_slide = (data, time, config) => { // console.group("Updating Main Slide with:"); // console.info(data); // console.info(time); // console.info(config); // console.groupEnd(); if (sol.defined(data.scheduleData)) { const schedule = data.scheduleData; const inner = html` ${talks_overview(schedule)}`; // Add main slide to frame const anchorElId = "main"; const el = document.getElementById(anchorElId); preact.render(inner, el); }; }; export { update_main_slide };