import { useQuery } from '@tanstack/react-query';
import { useSeamClient } from '../../../../lib/seam/use-seam-client.js';
export function useManufacturer(params) {
    const normalizedParams = typeof params === 'string' ? { manufacturer_id: params } : params;
    const { client: seam } = useSeamClient();
    const { data, ...rest } = useQuery({
        enabled: seam != null,
        queryKey: ['internal', 'manufacturers', 'get', normalizedParams],
        queryFn: async () => {
            if (seam == null)
                return null;
            const { data: { manufacturer }, } = await seam.client.get('/internal/devicedb/v1/manufacturers/get', { params: normalizedParams });
            return manufacturer;
        },
    });
    return { ...rest, manufacturer: data };
}
//# sourceMappingURL=use-manufacturer.js.map