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