// In an app: import { setupWeatherCard } from '@aparte/plugin-cards/weather';
const { setupWeatherCard } = window.apartePlugins.cards.weather;
setupWeatherCard({ tool: 'get_weather', variant: 'forecast' });
document.querySelector('aparte-chat-bubble').setSegments([{
id: 's1', type: 'tool_call', status: 'resolved',
toolCall: { id: 'c-s1', name: 'get_weather', input: { city: 'Tokyo', days: 7 } },
structuredResult: {
location: 'Tokyo', condition: 'rain', temperature: 17, high: 19, low: 13,
daily: [[19, 13, 'rain', 80], [22, 14, 'partly-cloudy', 10], [24, 16, 'clear', 0], [21, 15, 'cloudy', 20],
[18, 12, 'thunder', 70], [20, 13, 'drizzle', 40], [23, 15, 'clear', 0]]
.map(([high, low, condition, precipitation], i) => ({ date: new Date(Date.now() + i * 86400000), high, low, condition, precipitation })),
},
}]);