// storage/storybook-store.ts — Persistence for Storybook component catalog (SPEC-432)
import { join } from 'node:path';
import { hashProjectPath, readJson, writeJson } from './base-store.js';
function storybookPath(projectPath) {
    const id = hashProjectPath(projectPath);
    return join('data', 'projects', id, 'storybook-components.json');
}
export async function getStorybookComponents(projectPath) {
    const filePath = storybookPath(projectPath);
    const result = await readJson(filePath, null);
    return result;
}
export async function saveStorybookComponents(projectPath, result) {
    const filePath = storybookPath(projectPath);
    await writeJson(filePath, result);
}
//# sourceMappingURL=storybook-store.js.map