import type { Logging } from 'homebridge'; import type { CharacteristicConstructor } from '../interfaces/hap-types-interface.js'; import { SecurityState } from '../types/security-state-type.js'; import { OriginType } from '../types/origin-type.js'; import type { ServiceRegistry } from '../interfaces/service-registry-interface.js'; import type { SystemState } from '../interfaces/system-state-interface.js'; import type { SecuritySystemOptions } from '../interfaces/options-interface.js'; import type { EventBusService } from '../services/event-bus-service.js'; import type { AudioService } from '../services/audio-service.js'; import type { SensorHandler } from './sensor-handler.js'; import type { TimerManager } from '../timers/timer-manager.js'; import type { ServiceResult } from '../types/service-result-type.js'; /** * Handles the trip switch and trigger-delay logic, including all blocking conditions. * Communicates state transitions back to the state machine via the event bus so that * no circular import is needed with StateHandler. */ export declare class TripHandler { private readonly services; private readonly state; private readonly options; private readonly Characteristic; private readonly log; private readonly bus; private readonly audio; private readonly sensorHandler; private readonly timers; private readonly conditions; constructor(services: ServiceRegistry, state: SystemState, options: SecuritySystemOptions, Characteristic: CharacteristicConstructor, log: Logging, bus: EventBusService, audio: AudioService, sensorHandler: SensorHandler, timers: TimerManager); /** * Evaluates all blocking conditions for a trip action without side effects. * Returns a failed result with the condition's reason if any condition blocks the action. */ checkTripConditions(value: boolean, origin: OriginType): ServiceResult; /** * Core trip-switch logic shared by all trip/trigger paths. * Returns a result object indicating success or the reason for failure. */ updateTripSwitch(value: boolean, origin: OriginType, stateChanged: boolean): ServiceResult; /** * Trip a mode-specific switch. Only triggers if the system is currently in * the required mode (or the alarm is triggered and target matches). */ triggerIfModeSet(requiredState: SecurityState, value: boolean): ServiceResult; resetTripSwitches(): void; private makeContext; private activateTrip; private startTrippedMotionSensor; private cancelTrip; private resolveTriggerSeconds; }