import React, { useEffect } from 'react'; interface PrivacySettingsProps { selectedOption: string; // The currently selected option handleRadioChange: (option: string) => void; // Function to handle option changes openSourceMode: boolean; // Boolean to check if the mode is open source } const PrivacySettings: React.FC = ({ selectedOption, handleRadioChange, openSourceMode }) => { // Set default option based on openSourceMode if no option is selected useEffect(() => { if (!selectedOption) { handleRadioChange(openSourceMode ? 'Offline (FOSS)' : 'None'); } }, [selectedOption, handleRadioChange, openSourceMode]); // Define your options const options = [ { value: 'Online', label: 'Online' }, { value: 'Offline', label: 'Offline' }, { value: 'None', label: 'None' }, { value: 'Offline (FOSS)', label: 'Offline (FOSS)' }, { value: 'Online (FOSS)', label: 'Online (FOSS)' }, { value: 'None (FOSS)', label: 'None (FOSS)' }, ]; return (

Select Privacy Mode:

{options.map((option) => (
))}
); }; export default PrivacySettings;