import ObjectSelect, {ObjectSelectProps} from "../../ObjectSelect/ObjectSelect.tsx";
import {PayrollSchemeSchema} from "../../../client";
import {FC} from "react";
import usePayrollSchemasList from "../../../hooks/usePayrollSchemasList.tsx";

type Props = Omit<ObjectSelectProps<PayrollSchemeSchema>, 'data' | 'getValueFn' | 'getLabelFn'>

const PayrollSchemeSelect: FC<Props> = (props) => {
    const {objects: payrollSchemeSchemas} = usePayrollSchemasList();
    return (
        <ObjectSelect
            getValueFn={(baseMarketplace) => baseMarketplace.key}
            getLabelFn={(baseMarketplace) => baseMarketplace.name}
            data={payrollSchemeSchemas}
            {...props}
        />
    )
}
export default PayrollSchemeSelect