# | Settings configuration instances (defaults only)
# | Migrated from: provisioning/kcl/settings.k
# | Pattern: Hybrid - defaults + makers + direct access (contracts available via import)

let contracts_lib = import "./contracts.ncl" in
let defaults_lib = import "./defaults.ncl" in

{
  # ============================================================================
  # SECTION 1: Direct access to defaults
  # Use when: Understanding default values, building custom instances manually
  # Exported: YES - for inspection and custom building
  # ============================================================================
  defaults = defaults_lib,

  # ============================================================================
  # SECTION 2: Convenience makers (90% of use cases)
  # Use when: Creating instances with overrides, simple customization
  # Note: Not exported to TOML/JSON (functions aren't serializable)
  # ============================================================================

  make_secret_provider | not_exported = fun overrides =>
    defaults_lib.secret_provider & overrides,

  make_sops_config | not_exported = fun overrides =>
    defaults_lib.sops_config & overrides,

  make_kms_config | not_exported = fun overrides =>
    defaults_lib.kms_config & overrides,

  make_ai_provider | not_exported = fun overrides =>
    defaults_lib.ai_provider & overrides,

  make_run_set | not_exported = fun overrides =>
    defaults_lib.run_set & overrides,

  make_settings | not_exported = fun overrides =>
    defaults_lib.settings & overrides,

  # ============================================================================
  # SECTION 3: Default instances (bare defaults)
  # Use when: Need unmodified default values
  # Exported: YES - for direct use without customization
  # ============================================================================
  DefaultSecretProvider = defaults_lib.secret_provider,
  DefaultSopsConfig = defaults_lib.sops_config,
  DefaultKmsConfig = defaults_lib.kms_config,
  DefaultAIProvider = defaults_lib.ai_provider,
  DefaultRunSet = defaults_lib.run_set,
  DefaultSettings = defaults_lib.settings,
}
