import Option from "@/interfaces/option"; import Select from "../Low/Select"; import { CorporateUser, TeacherUser } from "@/interfaces/user"; interface Props { teachers: TeacherUser[]; corporates: CorporateUser[]; selects: (Option | null | undefined)[]; onSelectChange: (numberOfSelects: number, index: number, value: Option | null) => void; } export default function WorkflowStepSelects({ teachers, corporates, selects, onSelectChange, }: Props) { const teacherOptions: Option[] = teachers.map((teacher) => ({ value: teacher.id, label: teacher.name, icon: () => {teacher.name} })); const corporateOptions: Option[] = corporates.map((corporate) => ({ value: corporate.id, label: corporate.name, icon: () => {corporate.name} })); return (
{selects.map((option, index) => { let classes = "px-2 rounded-none"; if (index === 0 && selects.length === 1) { classes += " rounded-l-2xl rounded-r-2xl"; } else if (index === 0) { classes += " rounded-l-2xl"; } else if (index === selects.length - 1) { classes += " rounded-r-2xl"; } return (