import { jsx as _jsx } from "react/jsx-runtime";
import { fn } from '@storybook/test';
import { TechDecisionsReview } from './tech-decisions-review.js';
const mockData = {
    name: 'Agent Executor Abstraction',
    summary: 'Research into the best approach for abstracting agent executors to support multiple AI backends (Claude Code, Cursor, custom agents).',
    technologies: ['TypeScript', 'tsyringe', 'LangGraph', 'Claude API'],
    decisions: [
        {
            title: 'Agent Execution Framework',
            chosen: 'LangGraph',
            rejected: ['Custom state machine', 'Temporal.io', 'Step Functions'],
            rationale: 'LangGraph provides built-in checkpointing, human-in-the-loop support, and integrates natively with LangChain. The custom state machine approach was too low-level and would require rebuilding features LangGraph offers out of the box.',
        },
        {
            title: 'Dependency Injection',
            chosen: 'tsyringe',
            rejected: ['InversifyJS', 'TypeDI', 'Manual DI'],
            rationale: 'tsyringe is lightweight, uses standard decorators, and has minimal overhead. InversifyJS was too complex for our needs, and manual DI would not scale well as the agent system grows.',
        },
        {
            title: 'Inter-Process Communication',
            chosen: 'Server-Sent Events (SSE)',
            rejected: ['WebSockets', 'Long Polling', 'gRPC'],
            rationale: 'SSE provides a simple one-way streaming protocol that fits our use case perfectly — the agent streams status updates to the UI. WebSockets would add unnecessary complexity for bidirectional communication we do not need.',
        },
        {
            title: 'Configuration Storage',
            chosen: 'SQLite',
            rejected: ['JSON files', 'LevelDB', 'PostgreSQL'],
            rationale: 'SQLite offers ACID transactions, SQL query support, and zero-config deployment. JSON files lack transactions and concurrent access support. PostgreSQL would be overkill for a local CLI tool.',
        },
    ],
};
/* ─── Standalone TechDecisionsReview ─── */
const meta = {
    title: 'Drawers/Review/TechDecisionsReview',
    component: TechDecisionsReview,
    tags: ['autodocs'],
    parameters: {
        layout: 'fullscreen',
    },
    decorators: [
        (Story) => (_jsx("div", { style: { height: '600px', width: '400px', border: '1px solid var(--color-border)' }, children: _jsx(Story, {}) })),
    ],
};
export default meta;
/** Default — scrollable list of decisions taken. "Other Options Considered" toggle plays expand/collapse sounds. */
export const Default = {
    args: {
        data: mockData,
        onReject: fn().mockName('onReject'),
        onApprove: fn().mockName('onApprove'),
    },
};
/** Processing state — approve button disabled. */
export const Processing = {
    args: {
        data: mockData,
        onApprove: fn().mockName('onApprove'),
        isProcessing: true,
    },
};
/** Single decision. */
export const SingleDecision = {
    args: {
        data: { ...mockData, decisions: [mockData.decisions[0]] },
        onReject: fn().mockName('onReject'),
        onApprove: fn().mockName('onApprove'),
    },
};
/** No technologies listed. */
export const NoTechnologies = {
    args: {
        data: { ...mockData, technologies: [] },
        onReject: fn().mockName('onReject'),
        onApprove: fn().mockName('onApprove'),
    },
};
/* ─── Reject Variants ─── */
/** With reject button visible next to approve. */
export const WithRejectButton = {
    args: {
        data: mockData,
        onApprove: fn().mockName('onApprove'),
        onReject: fn().mockName('onReject'),
    },
};
/** Rejecting state — reject button disabled while reject action is in flight. */
export const RejectingState = {
    args: {
        data: mockData,
        onApprove: fn().mockName('onApprove'),
        onReject: fn().mockName('onReject'),
        isRejecting: true,
    },
};
