import { ConfigBeanRequest, ConfigBeanResponse } from '../../../services/config-bean';
import { KosServiceResponse } from '../../../../core';


/**
 * Configuration options for ConfigBeanModel instances.
 *
 * Specifies which configuration path to access and optionally provides custom
 * service implementations for testing or alternative backends.
 *
 * @category Model Configuration
 * @category System Integration
 */
export interface IConfigBeanModelOptions {
  /** The hierarchical configuration path using colon-separated notation (e.g., 'system:app', 'kos:service:CANPumpMgr') */
  path: string;

  /** Optional custom base path for configuration service endpoints */
  serviceBasePath?: string;

  /** Optional custom service implementation for retrieving configuration data */
  getConfigBean?: (
    path: string,
    serviceBasePath?: string
  ) => Promise<KosServiceResponse<ConfigBeanResponse> | undefined>;

  /** Optional custom service implementation for updating configuration data */
  modifyConfigBean?: (
    path: string,
    data: ConfigBeanRequest,
    serviceBasePath?: string
  ) => Promise<KosServiceResponse<unknown> | undefined>;
}
