import { Calendar, ChevronDown, Star, } from "lucide-react" import type { Question } from "@/lib/types" interface QuestionPreviewProps { question: Question index: number } export function QuestionPreview({ question, index }: QuestionPreviewProps) { return (
{index + 1}

{question.title} {question.required && ( * )}

{question.type.replace("_", " ")}

{question.type === "short_text" && (
Short answer text
)} {question.type === "long_text" && (
Long answer text
)} {question.type === "multiple_choice" && question.options.length > 0 && (
{question.options.map((option) => ( ))}
)} {question.type === "checkbox" && question.options.length > 0 && (
{question.options.map((option) => ( ))}
)} {question.type === "dropdown" && (
Select an option
)} {question.type === "date" && (
mm / dd / yyyy
)} {question.type === "rating" && (
{[1, 2, 3, 4, 5].map((star) => ( ))}
)}
) }