import { Field, Label } from '@components/FormElements'; import Tooltip from '@components/Tooltip/Tooltip'; import { LocalStorage } from '@services/local-storage'; import { useAckeeTracker } from '@utils/providers/ackee'; import { useEffect, useState } from 'react'; import { useIntl } from 'react-intl'; import styles from './AckeeSelect.module.scss'; const AckeeSelect = () => { const intl = useIntl(); const options = [ { id: 'partial', name: intl.formatMessage({ defaultMessage: 'Partial', description: 'AckeeSelect: partial option name', id: 'e/8Kyj', }), value: 'partial', }, { id: 'full', name: intl.formatMessage({ defaultMessage: 'Full', description: 'AckeeSelect: full option name', id: 'PzRpPw', }), value: 'full', }, ]; const [value, setValue] = useState('full'); const { setDetailed } = useAckeeTracker(); useEffect(() => { setDetailed(value === 'full'); }, [setDetailed, value]); useEffect(() => { const initialState = LocalStorage.get('ackee-tracking'); if (initialState) setValue(initialState); }, []); useEffect(() => { LocalStorage.set('ackee-tracking', `${value}`); }, [value]); const label = (