import { WalkthroughEvaluationSection } from '@/components/walkthrough-form/WalkthroughEvaluationSection';
import { WalkthroughGoalFields } from '@/components/walkthrough-form/WalkthroughGoalFields';
import { WalkthroughSubmitBar } from '@/components/walkthrough-form/WalkthroughSubmitBar';
import { WalkthroughSubmittedState } from '@/components/walkthrough-form/WalkthroughSubmittedState';
import { WalkthroughTeacherFields } from '@/components/walkthrough-form/WalkthroughTeacherFields';
import type { WalkthroughFormViewProps } from '@/components/walkthrough-form/types';

export function WalkthroughFormView({ state, actions, submitting }: WalkthroughFormViewProps) {
  if (state.submitted) {
    return <WalkthroughSubmittedState state={state} actions={actions} submitting={submitting} />;
  }

  return (
    <div className="space-y-6">
      <WalkthroughTeacherFields state={state} actions={actions} submitting={submitting} />
      <WalkthroughEvaluationSection state={state} actions={actions} submitting={submitting} />
      <WalkthroughGoalFields state={state} actions={actions} submitting={submitting} />
      <WalkthroughSubmitBar state={state} actions={actions} submitting={submitting} />
    </div>
  );
}
