import {ControllerRenderProps} from 'react-hook-form';
import {FilterState} from "../../../features/filterSlice/filterSlice";
import {FC} from "react";
import {RadioButton} from "react-native-paper";
import SortingButton from "./SortingButton";
import {View} from 'react-native';

type Props = ControllerRenderProps<FilterState, "sorting">;


const SortingButtons: FC<Props> = ({value, onChange, disabled}) => {
    return (
        <RadioButton.Group value={value} onValueChange={onChange}>
            <View style={{display: "flex", flexDirection: "column"}}>
                <SortingButton value={"shipment_date_desc"} label={"Дата отгрузки по возрастанию"}/>
                <SortingButton value={"shipment_date_asc"} label={"Дата отгрузки по убыванию"}/>
                <SortingButton value={"created_date_desc"} label={"Дата создание по возрастанию"}/>
                <SortingButton value={"created_date_asc"} label={"Дата создания по убыванию"}/>
            </View>

        </RadioButton.Group>
    )
}
export default SortingButtons;