/** * Supera Glia - Tab Assistente IA v3 * Iframe ocupa toda a tela disponível */ (function() { 'use strict'; const IA_URL = 'https://ia.supera.myddns.me'; const AssistenteTab = () => { const { useState } = SuperaGlia.hooks; const [carregando, setCarregando] = useState(true); const [erro, setErro] = useState(false); return React.createElement('div', { style: { height: 'calc(100vh - 32px)' }, className: 'relative rounded-lg overflow-hidden' }, carregando && React.createElement('div', { className: 'absolute inset-0 flex items-center justify-center bg-gray-50 z-10' }, React.createElement('div', { className: 'text-center' }, React.createElement('div', { className: 'w-10 h-10 border-4 border-teal-200 border-t-teal-500 rounded-full animate-spin mx-auto mb-4' }), React.createElement('p', { className: 'text-gray-500' }, 'Carregando...') ) ), erro ? React.createElement('div', { className: 'h-full flex items-center justify-center bg-gray-50' }, React.createElement('div', { className: 'text-center' }, React.createElement('p', { className: 'text-gray-500 mb-4' }, 'Não foi possível carregar'), React.createElement('button', { onClick: () => window.open(IA_URL, '_blank'), className: 'px-4 py-2 bg-teal-500 text-white rounded-lg' }, 'Abrir em nova aba') ) ) : React.createElement('iframe', { src: IA_URL, className: 'w-full h-full border-0', onLoad: () => setCarregando(false), onError: () => { setCarregando(false); setErro(true); }, allow: 'microphone; clipboard-read; clipboard-write' }) ); }; SuperaGlia.initAssistenteTab = function() { SuperaGlia.AssistenteTab = AssistenteTab; }; })();