/**
* Agent Ready page entry (agent-readiness-spec F1 + F4.5, Phase E Lane E3).
*
* Audit score hero, per-domain findings accordion with one-click fixes,
* and agent-readiness feature toggles.
* Loaded lazily by admin-shell-main.tsx for the
* `llmagnet-ai-seo-agent-ready` submenu page.
*/
import { useCallback, useEffect, useState } from 'react';
import { Loader2, Radar } from 'lucide-react';
import { initEntry } from './hooks/use-bootstrap';
import { Button } from '@/components/ui/button';
import { ScoreHero } from '@/components/agent-ready/score-hero';
import { FindingsAccordion } from '@/components/agent-ready/findings-accordion';
import { FeatureToggles } from '@/components/agent-ready/feature-toggles';
import {
applyFix,
fetchResult,
fetchSettings,
runAudit,
saveSettings,
} from '@/components/agent-ready/api';
import type { AgentReadySettings, AuditResult } from '@/components/agent-ready/types';
import { __ } from './lib/i18n';
import './index.css';
initEntry('llmagnetAgentReadyData', 'Agent Ready');
function EmptyState({ running, onRun }: { running: boolean; onRun: () => void }) {
return (
{__('Run your first Agent-Ready audit', 'llmagnet-llm-txt-generator')}
{__(
'A sampled audit (homepage + a few representative pages) scores your site across 7 domains of agent-readiness standards and shows exactly what to fix — much of it with one click.',
'llmagnet-llm-txt-generator',
)}
{__(
'Audit your site against current agent-readiness standards and fix the gaps — discovery files, machine-readable content, WebMCP, and security headers.',
'llmagnet-llm-txt-generator',
)}