import { Observer, Subject, Subscription } from 'rxjs'; import { Optional, Ignorable, ForwardBehaviorSubject, FixedLengthStack } from '../../../common'; import { Logger, OnModuleDestroy } from '@nestjs/common'; import { GoveeDeviceCommand, GoveeDeviceStatus } from '../../../data'; import { DeviceModel } from '../devices.model'; import { CommandResult, MessageData, OpCommandIdentifier, ParseOption, StateCommandAndStatus } from './states.types'; export declare const filterCommands: (commands: number[][], type?: Optional, identifier?: Optional) => number[][]; export declare class DeviceState implements OnModuleDestroy { protected readonly device: DeviceModel; readonly name: StateName; protected readonly logger: Logger; protected readonly pendingCommands: Map & { op?: { command: (number | undefined)[][]; }; }>[]>; protected readonly stateValue: ForwardBehaviorSubject; readonly commandBus: Subject>; protected readonly clearCommand$: Subject; readonly clearCommand: import("rxjs").Connectable; readonly history: FixedLengthStack; protected readonly subscriptions: Subscription[]; protected readonly parseOption: ParseOption; protected readonly stateToCommand?: (state: StateValue) => Optional; get isCommandable(): boolean; subscribe(observerOrNext?: Partial> | ((value: StateValue) => void)): Subscription; get value(): StateValue; constructor(device: DeviceModel, name: StateName, initialValue: StateValue, parseOption?: ParseOption); previousState(last?: number): string[]; parseState(data: unknown): void; parse(data: MessageData): void; setState(nextState: StateValue): string[]; onModuleDestroy(): void; } export declare class DeviceOpState extends DeviceState { protected readonly opType: Ignorable>; readonly identifier: Ignorable>; constructor({ opType, identifier }: OpCommandIdentifier, device: DeviceModel, name: StateName, initialValue: StateValue, parseOption?: ParseOption); parseOpCommand(opCommand: number[]): void; parseMultiOpCommand(opCommands: number[][]): void; parse(data: MessageData): void; protected filterOpCommands(opCommands: number[][]): number[][]; } //# sourceMappingURL=device.state.d.ts.map