import { useState } from "react"; const Instructions = ({ modality, onComplete }) => { const [currentPage, setCurrentPage] = useState(0); const textInstructions = [ { title: "Welcome to the Text Response Evaluation Study", content: (

Thank you for participating in our research study. You will be evaluating AI-generated text responses to various questions.

What you'll be doing:

) }, { title: "How to Rate Responses", content: (

Rating Scale: You'll use a slider from 1 to 100 to rate each response.

Consider: Accuracy, helpfulness, completeness, and appropriateness of each response.

) }, { title: "Important Guidelines", content: (

Please remember:

Technical notes:

) } ]; const audioInstructions = [ { title: "Welcome to the Audio Response Evaluation Study", content: (

Thank you for participating in our research study. You will be evaluating AI-generated audio responses to various questions.

What you'll be doing:

Audio requirements:

) }, { title: "How to Rate Audio Responses", content: (

You'll rate each audio response on two dimensions:

1. Response Rating (Content Quality):

2. Audio Quality Rating:

) }, { title: "Audio Controls & Guidelines", content: (

Audio Controls Available:

Important Guidelines:

Technical notes:

) } ]; const instructions = modality === "text" ? textInstructions : audioInstructions; const isLastPage = currentPage === instructions.length - 1; const handleNext = () => { if (isLastPage) { onComplete(); } else { setCurrentPage(prev => prev + 1); } }; const handlePrevious = () => { setCurrentPage(prev => Math.max(0, prev - 1)); }; return (

{instructions[currentPage].title}

Page {currentPage + 1} of {instructions.length}
{instructions[currentPage].content}
{instructions.map((_, index) => (
))}
{isLastPage && (
Ready to begin? Click "Start Survey" to proceed to the {modality} evaluation tasks.
)}
); }; export default Instructions;