import { Accessor } from 'solid-js'; import { ConfigurableNavigator } from '../_configurable.js'; interface UseBluetoothRequestDeviceOptions { /** * * An array of BluetoothScanFilters. This filter consists of an array * of BluetoothServiceUUIDs, a name parameter, and a namePrefix parameter. * */ filters?: BluetoothLEScanFilter[] | undefined; /** * * An array of BluetoothServiceUUIDs. * * @see https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTService/uuid * */ optionalServices?: BluetoothServiceUUID[] | undefined; } interface UseBluetoothOptions extends UseBluetoothRequestDeviceOptions, ConfigurableNavigator { /** * * A boolean value indicating that the requesting script can accept all Bluetooth * devices. The default is false. * * !! This may result in a bunch of unrelated devices being shown * in the chooser and energy being wasted as there are no filters. * * * Use it with caution. * * @default false * */ acceptAllDevices?: boolean; } /** * Reactive Web Bluetooth API. * * @see https://solidjs-use.github.io/solidjs-use/core/useBluetooth */ declare function useBluetooth(options?: UseBluetoothOptions): UseBluetoothReturn; interface UseBluetoothReturn { isSupported: Accessor; isConnected: Accessor; device: Accessor; requestDevice: () => Promise; server: Accessor; error: Accessor; } export { UseBluetoothOptions, UseBluetoothRequestDeviceOptions, UseBluetoothReturn, useBluetooth };