import React, { useState } from 'react'; import { Typography, Button, Box, Paper, Radio, RadioGroup, FormControlLabel, FormControl, FormLabel, Link, Checkbox } from '@mui/material'; import TermsAndConditionsDialog from './TermsAndConditionsDialog'; export enum Role { Validator = 'validator', Participant = 'participant' } const SelectRoleCard = ({ handleAccept, handleRoleChange }: { handleAccept: () => void, handleRoleChange: (role: Role) => void }) => { const [selectedRole, setSelectedRole] = useState(Role.Participant); const [checked, setChecked] = useState(false); const [isHidden, setIsHidden] = useState(false); const [isDialogOpen, setisDialogOpen] = useState(false) const handleCheckboxChange = (event: React.ChangeEvent) => { setChecked(event.target.checked); }; const handleContinue = () => { handleAccept() setIsHidden(true) } const handleRadioChange = (event: React.ChangeEvent) => { setSelectedRole(event.target.value as Role); handleRoleChange((event.target as HTMLInputElement).value === Role.Validator ? Role.Validator : Role.Participant); setChecked(false); }; return ( Select your role } label="Validator" /> } label="Participant" /> I accept the setisDialogOpen(true)} target="_blank" rel="noopener"> terms and conditions setisDialogOpen(false)}/> ); }; export default SelectRoleCard;