import { createStoreBackedReadModel } from './ui-read-model-helpers.js';
export function createMaintenanceObservabilityReadModels(runtimeServices) {
    return {
        settings: {
            getSnapshot() {
                const snapshot = runtimeServices.integrationHelpers.getSettingsSnapshot();
                return {
                    available: snapshot.available,
                    conflictCount: snapshot.available ? snapshot.conflicts.length : 0,
                    recentFailureCount: snapshot.available ? snapshot.recentFailures.length : 0,
                    managedLockCount: snapshot.available ? snapshot.managedLockCount : 0,
                    hasStagedManagedBundle: snapshot.available ? Boolean(snapshot.stagedManagedBundle) : false,
                };
            },
            subscribe() {
                return () => { };
            },
        },
        continuity: createStoreBackedReadModel(runtimeServices, () => {
            const snapshot = runtimeServices.integrationHelpers.getContinuitySnapshot();
            return snapshot;
        }),
        worktrees: {
            getSnapshot() {
                const snapshot = runtimeServices.integrationHelpers.getWorktreeSnapshot();
                return {
                    summary: snapshot.summary,
                    records: snapshot.records,
                };
            },
            subscribe() {
                return () => { };
            },
        },
    };
}
