// Worker-only adapter auto-imports for bundler-based runtimes (e.g. Cloudflare Workers).
// Keep this list limited to database adapters needed by runtime config.
import { ProjectRuntime } from './ProjectRuntime.js';
const tryImportProjectRuntime = async () => {
    try {
        ProjectRuntime.set(await import('../zintrust.runtime.wg.js'));
        return;
    }
    catch {
        // continue
    }
    try {
        ProjectRuntime.set(await import('../zintrust.runtime.js'));
    }
    catch {
        // Ignore missing runtime modules. Worker startup can still proceed without them.
    }
};
// These imports resolve against the host project (developer working directory)
// via the @/ alias configured by the ZinTrust app templates.
const tryImportOptional = async () => {
    await tryImportProjectRuntime();
    try {
        await import('../zintrust.plugins.wg.js');
    }
    catch {
        // Log and swallow errors since these are optional imports that may not exist in all projects.
    }
};
const ready = await tryImportOptional();
export const WorkerAdapterImports = Object.freeze({
    loaded: true,
    ready,
});
