/**
 * Adapter registry — maps moduleId to adapter function + defaults.
 */

import type { AdapterFn } from './types';
import type { ActivityModuleConfig } from '../schemas';
import { rcalAdapter } from './rcal-adapter';
import { rtasksAdapter } from './rtasks-adapter';
import { rdocsAdapter } from './rdocs-adapter';
import { rnotesAdapter } from './rnotes-adapter';
import { rsocialsAdapter } from './rsocials-adapter';
import { rwalletAdapter } from './rwallet-adapter';
import { rphotosAdapter } from './rphotos-adapter';
import { rfilesAdapter } from './rfiles-adapter';

export interface AdapterEntry {
	adapter: AdapterFn;
	defaults: ActivityModuleConfig;
}

export const adapterRegistry: Record<string, AdapterEntry> = {
	rcal: {
		adapter: rcalAdapter,
		defaults: { enabled: true, label: 'Calendar', color: '#f59e0b' },
	},
	rtasks: {
		adapter: rtasksAdapter,
		defaults: { enabled: true, label: 'Tasks', color: '#8b5cf6' },
	},
	rdocs: {
		adapter: rdocsAdapter,
		defaults: { enabled: true, label: 'Docs', color: '#3b82f6' },
	},
	rnotes: {
		adapter: rnotesAdapter,
		defaults: { enabled: false, label: 'Vaults', color: '#a78bfa' },
	},
	rsocials: {
		adapter: rsocialsAdapter,
		defaults: { enabled: false, label: 'Socials', color: '#ec4899' },
	},
	rwallet: {
		adapter: rwalletAdapter,
		defaults: { enabled: false, label: 'Wallet', color: '#10b981' },
	},
	rphotos: {
		adapter: rphotosAdapter,
		defaults: { enabled: false, label: 'Photos', color: '#f97316' },
	},
	rfiles: {
		adapter: rfilesAdapter,
		defaults: { enabled: false, label: 'Files', color: '#64748b' },
	},
};
