import { ipcMain } from 'electron' import { IPC } from '../../../shared/ipc-channels' import { ArcService } from '../../services/arc.service' import type { BookRegistryService } from '../../services/book-registry' import { wrap } from '../result' export function registerArcHandlers(registry: BookRegistryService): void { ipcMain.handle( IPC.ARC_GET_FOR_CHARACTER, (_e, { bookId, settingId }: { bookId: string; settingId: string }) => wrap(() => new ArcService(registry.getDb(bookId)).getForCharacter(settingId)) ) }