"use client";

import { FC } from "react";
import ObjectMultiSelect, {
    ObjectMultiSelectProps,
} from "@/components/selects/ObjectMultiSelect/ObjectMultiSelect";
import { ServiceSchema } from "@/lib/client";
import useServicesList from "@/modules/dealModularEditorTabs/FulfillmentBase/shared/hooks/lists/useServicesList";

type Props = Omit<ObjectMultiSelectProps<ServiceSchema>, "data">;

const ServicesMultiselect: FC<Props> = (props: Props) => {
    const { services } = useServicesList();

    return (
        <ObjectMultiSelect
            data={services}
            searchable
            {...props}
        />
    );
};

export default ServicesMultiselect;
