// Local dev-reference copy — real scaffolds get this file's content from
// `generateTemplatePage()` in bin/cli.ts, not from this file on disk.
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';
import { useFdmAssistant } from '../features/assistant';

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

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