import React from "react"
import { SelectRateComponent } from "@component/Common/SelectRate/component"
import { SelectProps } from "antd"

export interface SelectRateProps extends Omit<SelectProps, "options"> {
    options?: any[]
    refetchOnMount?: boolean
    onChange?: any
    formRef: any
    setValue: (value: any) => void
    value: any
}

export const SelectRate = (props: SelectRateProps) => {
    const data = Array.from({ length: 5})?.map((_, i) => ({
        name: `${i+1}`,
        code: i+1,
    }))

    return (
        <SelectRateComponent
            options={data.reverse()}
            {...props}
        />
    )
}
