import { BarcodeService } from "../../../client";
import { useQuery } from "@tanstack/react-query";

const useBarcodeTemplateSizesList = () => {
    const { isLoading, data, error, refetch } = useQuery({
        queryKey: ["getAllBarcodeTemplateSizes"],
        queryFn: BarcodeService.getAllBarcodeTemplateSizes,
    });

    const barcodeTemplateSizes = isLoading || error || !data ? [] : data.sizes;

    return { barcodeTemplateSizes, refetch };
};
export default useBarcodeTemplateSizesList;
