${
ListGet.map( (item, index) => h(
BroadcastItem,
{
item: item,
previous: ListGet[index-1],
priority: item.id == LiveGet?.id,
selected: item.id == SelectedGet?.id,
select: ()=>SelectedSet(item)
}
))
}
<${BroadcastAlert}>/>
`;
}
/** @type {(props:{item:Boxcast.Broadcast, previous: false | Boxcast.Broadcast, priority:boolean, selected:boolean, select:()=>void})=>any} */
const BroadcastItem = ({item, previous, priority, selected, select}) =>
{
let pointerText;
if(item.timeframe == "current" || item.timeframe == "preroll")
{
pointerText = `Live:`;
}
else if (priority)
{
pointerText = `Next:`;
}
let partition;
if(!previous || (previous.start.Date !== item.start.Date))
{
partition = html`