import { DeviceOptions } from './types';
import { DeviceModel } from './device-model';
import { SingletonKosModelRegistrationFactory } from '../../../core';

/**
 * # Device Model Registration Factory
 *
 * **KOS Device Identity and Node Configuration Management**
 *
 * The Device registration factory provides convenient methods for creating and working with DeviceModel instances.
 * Device models handle device identity, hardware serial numbers, and node configuration within KOS deployments.
 *
 * ## Core Registration Properties
 *
 * ### type
 *
 * Model type identifier used for dependency injection and type narrowing.
 * Essential for declaring model dependencies in other components.
 *
 * @example Model Dependency Declaration
 * ```typescript
 * @kosDependency({modelType: Device.type, id: "deviceId"})
 * private deviceModel: DeviceModel;
 * ```
 *
 * ### factory
 *
 * Creates DeviceModel instances with singleton behavior. Multiple calls return the same instance,
 * ensuring system-wide device identity consistency.
 *
 * **Singleton Behavior**: Subsequent factory calls return existing instance; options ignored after first creation.
 *
 * @example Device Creation and Identity Access
 * ```typescript
 * const device = Device.factory({
 *   serialNumber: 'KOS-DEVICE-001',
 *   name: 'Production Dispenser Alpha',
 *   nodeId: 'primary-controller'
 * });
 *
 * // Access device identity
 * console.log(`Device: ${device.name} (${device.serialNumber})`);
 * console.log(`Node: ${device.nodeType}-${device.nodeName}`);
 * ```
 *
 * @example Multi-node System Coordination
 * ```typescript
 * const primaryDevice = Device.factory({ nodeId: 'primary-main' });
 * const backupDevice = Device.factory({ nodeId: 'secondary-backup' });
 *
 * // Coordinate based on node roles
 * if (primaryDevice.nodeType === 'primary') {
 *   // Handle primary node responsibilities
 * }
 * ```
 *
 * ### predicate
 *
 * [TypeScript type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates)
 * for identifying and narrowing models to DeviceModel instances.
 *
 * @example Type Narrowing for Device Operations
 * ```typescript
 * const model: IKosDataModel = getModel(); // some model
 *
 * if (Device.predicate(model)) {
 *   // Compiler now knows model is DeviceModel
 *   console.log(`Device Serial: ${model.serialNumber}`);
 *   model.updateModel({ name: 'Updated Name' });
 * }
 * ```
 *
 * ### registration
 *
 * Registration object for model registry integration. Provides all required information
 * for registering the DeviceModelImpl implementation with the model registry.
 *
 * @example Model Registry Configuration
 * ```typescript
 * // registration.ts
 * import { Device } from "@kos-ui/project-models";
 * import { KosModelRegistry } from "@kosdev-code/kos-dispense-sdk";
 *
 * KosModelRegistry.dispense
 *   .models()
 *   .model(Device);
 * ```
 *
 * ## Singleton Architecture
 *
 * **Device models use singleton pattern** ensuring system-wide consistency:
 * - Each device type has exactly one instance
 * - Subsequent factory calls return existing instance
 * - Options are ignored after initial creation
 * - Uses model type as unique identifier
 * - Guarantees device identity consistency across system
 *
 * @group KOS Model
 * @category Device Data
 */
export declare const Device: SingletonKosModelRegistrationFactory<DeviceModel, DeviceOptions>;
//# sourceMappingURL=device-registration.d.ts.map