import useBriefing from '../hooks/useBriefing';
import useReview from '../hooks/useReview';
import DecisionCard from '../components/decision/DecisionCard';
import BriefingEmpty from '../components/briefing/BriefingEmpty';

export default function BriefingTab() {
    const { briefing, loading, error, regenerating, regenerate } = useBriefing();
    const { latest: review } = useReview();

    if (loading) return <div className="briefing-empty"><p>로딩 중...</p></div>;
    if (!briefing) return <BriefingEmpty regenerating={regenerating} onRegenerate={regenerate} error={error} />;

    return (
        <div className="briefing-tab">
            <DecisionCard briefing={briefing} review={review} />
        </div>
    );
}
