import { getAutoDashboardData, startAuto } from "../auto.js";
const defaultDeps = {
    getSnapshot: () => getAutoDashboardData(),
    startAuto,
};
export async function resumeAutoAfterProviderDelay(pi, ctx, deps = defaultDeps) {
    const snapshot = deps.getSnapshot();
    if (snapshot.active)
        return "already-active";
    if (!snapshot.paused)
        return "not-paused";
    if (!snapshot.basePath) {
        ctx.ui.notify("Provider error recovery delay elapsed, but no paused auto-mode base path was available. Leaving auto-mode paused.", "warning");
        return "missing-base";
    }
    await deps.startAuto(ctx, pi, snapshot.basePath, false, { step: snapshot.stepMode });
    return "resumed";
}
