import React from 'react';
import { XerticaAssistant } from 'xertica-ui/assistant';
import { useLayout } from 'xertica-ui/hooks';
import { AppLayout } from '../app/components/AppLayout';
import { TemplateContent } from '../features/template';

/**
 * Template page — thin layout shell.
 *
 * Auth state is consumed from `AuthContext` via `AppLayout` — no props needed.
 */
export function TemplatePage() {
  const { assistenteExpanded, toggleAssistente } = useLayout();

  return (
    <AppLayout
      assistant={
        <XerticaAssistant
          isExpanded={assistenteExpanded}
          onToggle={toggleAssistente}
          onEvaluation={(id, type, reason) => console.log('Feedback:', id, type, reason)}
        />
      }
    >
      <TemplateContent />
    </AppLayout>
  );
}
