import EventEmitter from 'events'; import { AudioController, CachedValue, Device, DeviceOptions, PowerBehaviorOptions, SubmitFeedbackOptions, TheaterSettingValueTypes, TheatreSettingName } from '@sprucelabs/heartwood-view-controllers'; import { Orientation } from '../types/heartwood.types'; export declare class HeartwoodDevice extends EventEmitter implements Device { static Class?: new (storage: Storage, options?: DeviceOptions) => Device; private isNative; private commandQueue; private derredCommandInterval?; static setTimeout(callback: () => void, delay: number): NodeJS.Timeout; static clearTimeout(timeoutId: ReturnType): void; static setInterval(callback: () => void, delay: number): NodeJS.Timeout; static clearInterval(intervalId: NodeJS.Timeout): void; private storage; private orientation; private isGettingTheatreSetting; protected constructor(storage: Storage, options?: DeviceOptions); submitFeedback(options: SubmitFeedbackOptions): void; turnTorchOn(brightness?: number): void; turnTorchOff(): void; AudioController(mp3Url: string): Promise; openUrl(url: string): void; isBridgedToDevice(): boolean; static Device(storage: Storage, options?: DeviceOptions): HeartwoodDevice; setCachedValue(key: string, value: CachedValue): void; getCachedValue(key: string): CachedValue; call(phoneNumber: string): void; vibrate(): void; setOrientation(orientation: Orientation): void; getOrientation(): Orientation; enablePushNotifications(): void; signalSkillViewLoaded(): void; sendCommand(command: string, payload?: Record): void; private postMessage; private deferCommand; setTheatreSetting(name: N, value: TheaterSettingValueTypes[N]): void; getTheatreSetting(name: N): Promise; onMessage(name: string, timeoutMs?: number): Promise; setPowerBehavior(options: PowerBehaviorOptions): void; } export type DeviceOnMessageCallback = (callback: (json: string) => void) => void; export type DevicePostMessageCallback = (json: string) => void; declare global { interface Window { api?: { postMessage: DevicePostMessageCallback; onMessage?: DeviceOnMessageCallback; }; webkit?: { messageHandlers?: { messages?: { postMessage?: (json: string) => void; }; }; }; AndroidInterface?: { postMessage?: (json: string) => void; onMessage?: DeviceOnMessageCallback; }; } }