/** * Supera Glia - Tab Calendário (Google Calendar) * @module tabs/CalendarioTab * * Exibe o Google Calendar integrado com as agendas: * - Supera São Bento (superabhsaobento@gmail.com) * - XP (0eab3a47e818e3d6867847a34092925c0d5ab030ce510e2e10e2751b51671e79@group.calendar.google.com) */ (function() { 'use strict'; SuperaGlia.initCalendarioTab = function() { const { useState } = SuperaGlia.hooks; const { Icon } = SuperaGlia; SuperaGlia.CalendarioTab = () => { const [loading, setLoading] = useState(true); // URL completa do Google Calendar com as duas agendas const CALENDAR_URL = 'https://calendar.google.com/calendar/embed?' + 'src=superabhsaobento%40gmail.com&' + 'src=0eab3a47e818e3d6867847a34092925c0d5ab030ce510e2e10e2751b51671e79%40group.calendar.google.com&' + 'ctz=America%2FSao_Paulo&' + 'wkst=1&' + 'bgcolor=%23ffffff&' + 'showTitle=0&' + 'showNav=1&' + 'showDate=1&' + 'showPrint=1&' + 'showTabs=1&' + 'showCalendars=1&' + 'showTz=0&' + 'mode=MONTH'; return React.createElement('div', { className: 'space-y-4' }, // Header React.createElement('div', { className: 'bg-white rounded-2xl p-5 shadow-sm border border-gray-100 flex items-center justify-between' }, React.createElement('div', { className: 'flex items-center gap-4' }, React.createElement('div', { className: 'w-12 h-12 bg-gradient-to-br from-orange-500 to-orange-600 rounded-xl flex items-center justify-center shadow-lg' }, React.createElement(Icon, { name: 'calendar', className: 'w-6 h-6 text-white' }) ), React.createElement('div', null, React.createElement('h3', { className: 'font-bold text-gray-900 text-lg' }, 'Agenda'), React.createElement('p', { className: 'text-sm text-gray-500' }, 'Google Calendar - Supera São Bento') ) ), React.createElement('button', { onClick: () => window.open('https://calendar.google.com/calendar/u/1/r', '_blank'), className: 'flex items-center gap-2 px-4 py-2 bg-gray-100 hover:bg-gray-200 rounded-xl font-medium text-gray-700 transition-all' }, React.createElement(Icon, { name: 'external-link', className: 'w-4 h-4' }), 'Abrir em nova aba' ) ), // Iframe do Google Calendar React.createElement('div', { className: 'bg-white rounded-2xl shadow-sm border border-gray-100 overflow-hidden relative', style: { minHeight: 'calc(100vh - 220px)' } }, loading && React.createElement('div', { className: 'absolute inset-0 bg-gray-50 flex items-center justify-center z-10' }, React.createElement('div', { className: 'text-center' }, React.createElement('div', { className: 'w-10 h-10 border-4 border-orange-200 border-t-orange-500 rounded-full animate-spin mx-auto mb-4' }), React.createElement('p', { className: 'text-gray-500' }, 'Carregando agenda...') ) ), React.createElement('iframe', { src: CALENDAR_URL, style: { border: 0, width: '100%', height: 'calc(100vh - 220px)', minHeight: '600px' }, frameBorder: '0', scrolling: 'no', onLoad: () => setLoading(false) }) ) ); }; }; })();