import variables from 'config/variables'; import { useState } from 'react'; import { Header, Row, Content, Action, PreferencesWrapper, Section, } from 'components/Layout/Settings'; import { Checkbox, Switch, Text } from 'components/Form/Settings'; import { MdEventNote } from 'react-icons/md'; const GreetingOptions = () => { const [events, setEvents] = useState(false); const [birthday, setBirthday] = useState( new Date(localStorage.getItem('birthday')) || new Date(), ); const changeDate = (e) => { const newDate = e.target.value ? new Date(e.target.value) : new Date(); localStorage.setItem('birthday', newDate); setBirthday(newDate); }; const GREETING_SECTION = 'modals.main.settings.sections.greeting'; const AdditionalOptions = () => { return ( ); }; const BirthdayOptions = () => { return (

{variables.getMessage(`${GREETING_SECTION}.birthday_date`)}

); }; let header; if (events) { header = (
setEvents(false)} report={false} /> ); } else { header = (
); } return ( <> {header} {events ? ( <> {BirthdayOptions()} ) : (
setEvents(true)} icon={} /> )} ); }; export { GreetingOptions as default, GreetingOptions };