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' : 'None'); } }, [selectedOption, handleRadioChange, openSourceMode]); // Handle option click and allow all options, even in open-source mode const handleOptionClick = (option: string) => { handleRadioChange(option); // No restrictions on options }; return ( <> {/* AI Mode Radio Options */}

{openSourceMode ? 'Disable Options (FOSS Mode):' : 'Disable Options:'}

{/* Offline */}
handleOptionClick('Offline')} > Offline tools{openSourceMode ? ' (FOSS)' : ''}
{/* Online (Available even in FOSS mode) */}
handleOptionClick('Online')} > Online tools{openSourceMode ? ' (FOSS)' : ''}
{/* None */}
handleOptionClick('None')} > None{openSourceMode ? ' (FOSS)' : ''}

); }; export default PrivacySettings;