/** * Reactive battery status. * * Provides a reactive signal tracking the device's battery status * via the Battery Status API. * * @module bquery/media */ import type { BatterySignal } from './types'; /** * Returns a reactive signal tracking the device's battery status. * * Uses the Battery Status API (`navigator.getBattery()`) where available. * Falls back gracefully to a default state with `supported: false` when * the API is not available. * * @returns A readonly reactive signal with battery state and a `destroy()` method * to remove Battery Status API listeners * * @example * ```ts * import { useBattery } from '@bquery/bquery/media'; * import { effect } from '@bquery/bquery/reactive'; * * const battery = useBattery(); * effect(() => { * if (battery.value.supported) { * console.log(`Battery: ${(battery.value.level * 100).toFixed(0)}%`); * console.log(`Charging: ${battery.value.charging}`); * } * }); * ``` */ export declare const useBattery: () => BatterySignal; //# sourceMappingURL=battery.d.ts.map