import ObjectAutocomplete, {ObjectAutocompleteProps} from "../../ObjectAutocomplete/ObjectAutocomplete.tsx";
import useShippingWarehousesList from "./hooks/useShippingWarehousesList.tsx";
import {FC} from "react";
import {ShippingWarehouseSchema} from "../../../client";

type Props = Omit<ObjectAutocompleteProps<ShippingWarehouseSchema>, 'data'>;
const ShippingWarehouseAutocomplete: FC<Props> = (props) => {
    const {shippingWarehouses} = useShippingWarehousesList();
    return (
        <ObjectAutocomplete
            {...props}
            data={shippingWarehouses}
        />
    )
}

export default ShippingWarehouseAutocomplete;