import { StateBeanModel, StateBeanOptions, StatePropsMap } from './types';
import { StateBeanResponse } from './services';
import { StatePropertyTypes } from '../types';
import { PublicModelInterface } from '../../../core/types';
import { IKosModelLogger, KosContextLogger, KosCreationContext } from '../../../core';

export declare const MODEL_TYPE = "state-bean-model";
/**
 * StateBean - Reactive state management for KOS device state properties.
 *
 * The StateBean model provides real-time access to KOS device state information through
 * reactive properties that automatically synchronize with device state changes via WebSocket
 * topics. This model is essential for applications that need to monitor device state,
 * track property changes, or build reactive UIs that respond to device status updates.
 *
 * ## Key Features
 * - **Real-time Synchronization** - Automatic updates via `/kos/state/{path}` WebSocket topics
 * - **Type-safe Properties** - Strongly typed state properties with automatic type conversion
 * - **Observable State Map** - Reactive Map-based property storage for efficient updates
 * - **Automatic Type Conversion** - Smart conversion of string values to boolean/number types
 * - **Path-based Organization** - Hierarchical state organization using dot-notation paths
 * - **Lifecycle Management** - Proper initialization and loading of state data
 *
 * ## Topic-Based Reactivity
 * The model listens to KOS topics for real-time synchronization:
 * - **`/kos/state/{path}`** - Receives state updates for the specified path, triggering automatic property updates across all connected clients
 *
 * ## State Property Types
 * Supports all common KOS state property types:
 * - **string** - Text values, configuration strings, identifiers
 * - **number** - Numeric values, counters, measurements, percentages
 * - **boolean** - Status flags, enabled/disabled states, operational flags
 * - **object** - Complex state objects, nested configurations
 *
 * ## Common Use Cases
 * - **Device Status Monitoring** - Track operational states, error conditions, health metrics
 * - **Configuration State** - Monitor dynamic configuration changes and feature flags
 * - **System Status Dashboards** - Build real-time status displays and monitoring interfaces
 * - **Conditional UI Logic** - Show/hide UI elements based on device state
 * - **State-dependent Operations** - Enable/disable functionality based on device state
 * - **Multi-client Synchronization** - Keep multiple clients in sync with device state
 *
 * @interface
 * @example Basic Usage
 * ```typescript
 * const deviceState = StateBean.instance('device-status')
 *   .options({ path: 'device.operational.status' })
 *   .build();
 *
 * // Access reactive state properties
 * const isOnline = deviceState.props.get('online') as boolean;
 * const temperature = deviceState.props.get('temperature') as number;
 * ```
 *
 * @group KOS Model
 * @category State Management
 * @useDeclaredType
 *
 * @see {@link StateBeanOptions} - Configuration options for StateBean model
 * @see {@link StatePropertyTypes} - Supported state property value types
 * @see {@link StateProp} - Individual property access model
 * @see {@link getStateBeanData} - Service function for loading state data
 */
export type StateBean<T extends Record<string, StatePropertyTypes> = Record<string, StatePropertyTypes>> = PublicModelInterface<StateBeanModelImpl<T>>;
/**
 * @ignore
 * @internal
 */
export declare class StateBeanModelImpl<T extends Record<string, StatePropertyTypes> = Record<string, StatePropertyTypes>> implements StateBeanModel<T>, IKosModelLogger {
    /** Unique identifier for the model instance */
    id: string;
    /** State path being monitored for updates */
    path: string;
    /** Reactive Map of state properties with automatic type conversion */
    props: StatePropsMap<T>;
    /** Context logger for debugging and diagnostics */
    logger: KosContextLogger;
    constructor(modelId: string, options: StateBeanOptions, context: KosCreationContext);
    /**
     * Updates the model configuration with new options.
     * @param options New configuration options to apply
     */
    updateModel(options: StateBeanOptions): void;
    /**
     * Handles WebSocket state updates from the KOS topic system.
     * Automatically converts string values to appropriate types (boolean, number).
     * @param stateBean State data received from WebSocket topic
     * @internal
     */
    handleConfigBeanUpdated(stateBean: StateBeanResponse): void;
    /**
     * @internal
     */
    init(): Promise<void>;
    /**
     * Updates multiple properties at once with type conversion.
     * @param props Properties to update
     * @private
     */
    updateProps(props: Record<string, StatePropertyTypes>): void;
    /**
     * @internal
     */
    load(): Promise<void>;
}
//# sourceMappingURL=state-bean-model.d.ts.map