import type { Db } from '@mosaicstack/db';
import { createPreferencesRepo, type PreferencesRepo } from './preferences.js';
import { createInsightsRepo, type InsightsRepo } from './insights.js';

export interface Memory {
  preferences: PreferencesRepo;
  insights: InsightsRepo;
}

export function createMemory(db: Db): Memory {
  return {
    preferences: createPreferencesRepo(db),
    insights: createInsightsRepo(db),
  };
}
