// In an app: import { setupScoreCard } from '@aparte/plugin-cards/score';
const { setupScoreCard } = window.apartePlugins.cards.score;
// Tomorrow at 21:00, on the reader's clock.
const tomorrow = new Date(); tomorrow.setDate(tomorrow.getDate() + 1); tomorrow.setHours(21, 0, 0, 0);
setupScoreCard({ tool: 'get_scores', variant: 'compact' });
document.querySelector('aparte-chat-bubble').setSegments([{
id: 's1', type: 'tool_call', status: 'resolved',
toolCall: { id: 'c-s1', name: 'get_scores', input: { date: 'today' } },
structuredResult: {
title: 'Tonight',
matches: [
{ home: { name: 'Northport FC', shortName: 'NPT', color: '#c8102e', score: 2 }, away: { name: 'Riverside United', shortName: 'RIV', color: '#1d4ed8', score: 1 }, status: 'live', clock: 67, sport: 'football' },
{ home: { name: 'Bay City Comets', shortName: 'BAY', color: '#f59e0b', score: 88 },
away: { name: 'Lakeside Owls', shortName: 'LAK', color: '#0f766e', score: 91 },
status: 'live', clock: 'Q4 2:41', sport: 'basketball' },
{ home: { name: 'Westmoor', shortName: 'WES', color: '#7c3aed', score: 24 },
away: { name: 'Eastcliff', shortName: 'EAS', color: '#be123c', score: 17 }, status: 'final', sport: 'rugby' },
{ home: { name: 'Riverside United', shortName: 'RIV', color: '#1d4ed8' },
away: { name: 'Hillcrest Athletic', shortName: 'HIL', color: '#15803d' }, status: 'scheduled', startTime: tomorrow, sport: 'football' },
],
},
}]);