import React, { FC } from 'react'
import { Box, HStack, useRadio, useRadioGroup, UseRadioProps } from '@chakra-ui/react'
export type NotificationsFilterProps = {}
export const NotificationsFilter: FC<{ name: string; onChange?: (nextValue: string) => void; value: string }> = ({
onChange,
value,
name,
}) => {
const options = ['all', 'unread']
const optionLabels = ['Tutte', 'Non lette']
const { getRootProps, getRadioProps } = useRadioGroup({
name,
value,
onChange,
})
const group = getRootProps()
return (
{options.map((value, index) => {
const radio = getRadioProps({ value })
return (
{optionLabels[index]}
)
})}
)
}
export const NotificationsFilterItem: FC = (props) => {
const { getInputProps, getCheckboxProps } = useRadio(props)
const input = getInputProps()
const checkbox = getCheckboxProps()
return (
{props.children}
)
}