import {useState} from 'react'
import {View} from 'react-native'
import {msg, Trans} from '@lingui/macro'
import {useLingui} from '@lingui/react'
import {Nux, useSaveNux} from '#/state/queries/nuxs'
import {usePreferencesQuery} from '#/state/queries/preferences'
import {useInterestsDisplayNames} from '#/screens/Onboarding/state'
import {atoms as a, useTheme} from '#/alf'
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
import {Shapes_Stroke2_Corner0_Rounded as Shapes} from '#/components/icons/Shapes'
import {TimesLarge_Stroke2_Corner0_Rounded as X} from '#/components/icons/Times'
import {Link} from '#/components/Link'
import * as Prompt from '#/components/Prompt'
import {Text} from '#/components/Typography'
export function ExploreInterestsCard() {
const t = useTheme()
const {_} = useLingui()
const {data: preferences} = usePreferencesQuery()
const interestsDisplayNames = useInterestsDisplayNames()
const {mutateAsync: saveNux} = useSaveNux()
const trendingPrompt = Prompt.usePromptControl()
const [closing, setClosing] = useState(false)
const onClose = () => {
trendingPrompt.open()
}
const onConfirmClose = () => {
setClosing(true)
// if this fails, they can try again later
saveNux({
id: Nux.ExploreInterestsCard,
completed: true,
data: undefined,
}).catch(() => {})
}
return closing ? null : (
<>
Your interests
{preferences?.interests?.tags &&
preferences.interests.tags.length > 0 ? (
{preferences.interests.tags.map(tag => (
{interestsDisplayNames[tag]}
))}
) : null}
Your interests help us find what you like!
Edit interests
>
)
}