import { i as NodmixConfig } from "./types.nodmix-Dph4_Y30.js";
//#region src/config/runtime-snapshot.d.ts
type RuntimeConfigSnapshotRefreshOptions = {
  includeAuthStoreRefs?: boolean;
};
type RuntimeConfigSnapshotRefreshParams = RuntimeConfigSnapshotRefreshOptions & {
  sourceConfig: NodmixConfig;
  preflightResult?: unknown;
};
type MaybePromise<T> = T | Promise<T>;
type ConfigWriteAfterWrite = {
  mode: "auto";
} | {
  mode: "restart";
  reason: string;
} | {
  mode: "none";
  reason: string;
};
type ConfigWriteFollowUp = {
  mode: "auto";
  requiresRestart: false;
} | {
  mode: "none";
  reason: string;
  requiresRestart: false;
} | {
  mode: "restart";
  reason: string;
  requiresRestart: true;
};
declare function resolveConfigWriteAfterWrite(afterWrite?: ConfigWriteAfterWrite): ConfigWriteAfterWrite;
declare function resolveConfigWriteFollowUp(afterWrite?: ConfigWriteAfterWrite): ConfigWriteFollowUp;
type RuntimeConfigSnapshotRefreshHandler = {
  preflight?: (params: RuntimeConfigSnapshotRefreshParams) => MaybePromise<unknown>;
  refresh: (params: RuntimeConfigSnapshotRefreshParams) => boolean | Promise<boolean>;
  clearOnRefreshFailure?: () => void;
};
type RuntimeConfigWriteNotification = {
  configPath: string;
  sourceConfig: NodmixConfig;
  runtimeConfig: NodmixConfig;
  persistedHash: string;
  revision: number;
  fingerprint: string;
  sourceFingerprint: string | null;
  writtenAtMs: number;
  afterWrite?: ConfigWriteAfterWrite;
};
type RuntimeConfigSnapshotMetadata = {
  revision: number;
  fingerprint: string;
  sourceFingerprint: string | null;
  updatedAtMs: number;
};
declare function hashRuntimeConfigValue(value: NodmixConfig): string;
declare function setRuntimeConfigSnapshot(config: NodmixConfig, sourceConfig?: NodmixConfig): void;
declare function resetConfigRuntimeState(): void;
declare function clearRuntimeConfigSnapshot(): void;
declare function getRuntimeConfigSnapshot(): NodmixConfig | null;
declare function getRuntimeConfigSourceSnapshot(): NodmixConfig | null;
declare function getRuntimeConfigSnapshotMetadata(): RuntimeConfigSnapshotMetadata | null;
declare function resolveRuntimeConfigCacheKey(config: NodmixConfig): string;
declare function selectApplicableRuntimeConfig(params: {
  inputConfig?: NodmixConfig;
  runtimeConfig?: NodmixConfig | null;
  runtimeSourceConfig?: NodmixConfig | null;
}): NodmixConfig | undefined;
declare function setRuntimeConfigSnapshotRefreshHandler(refreshHandler: RuntimeConfigSnapshotRefreshHandler | null): void;
//#endregion
export { setRuntimeConfigSnapshotRefreshHandler as _, RuntimeConfigWriteNotification as a, getRuntimeConfigSnapshotMetadata as c, resetConfigRuntimeState as d, resolveConfigWriteAfterWrite as f, setRuntimeConfigSnapshot as g, selectApplicableRuntimeConfig as h, RuntimeConfigSnapshotRefreshOptions as i, getRuntimeConfigSourceSnapshot as l, resolveRuntimeConfigCacheKey as m, ConfigWriteFollowUp as n, clearRuntimeConfigSnapshot as o, resolveConfigWriteFollowUp as p, RuntimeConfigSnapshotMetadata as r, getRuntimeConfigSnapshot as s, ConfigWriteAfterWrite as t, hashRuntimeConfigValue as u };