import { useQuery } from '@tanstack/react-query';
import { useSeamClient } from '../../../../lib/seam/use-seam-client.js';
export function useDeviceModel(params) {
    const { client: seam } = useSeamClient();
    const { data, ...rest } = useQuery({
        enabled: seam != null,
        queryKey: ['internal', 'device_models', 'get', params],
        queryFn: async () => {
            if (seam == null)
                return null;
            const { data: { device_model: deviceModel }, } = await seam.client.get('/internal/devicedb/v1/device_models/get', { params });
            // UPSTREAM: Response type does not match DeviceModel.
            return deviceModel;
        },
    });
    return {
        ...rest,
        deviceModel: data,
    };
}
//# sourceMappingURL=use-device-model.js.map