'use client';

import { useSearchParams } from 'next/navigation';
import { DraftBox } from '@/components/approval/DraftBox';
import { DocumentCreate } from '@/components/approval/DocumentCreate';

export default function DraftBoxPage() {
  const searchParams = useSearchParams();
  const mode = searchParams.get('mode');

  if (mode === 'new') {
    return <DocumentCreate />;
  }

  return <DraftBox />;
}
