import { jsx as _jsx } from "react/jsx-runtime";
import { AgentQuestionsInbox } from './agent-questions-inbox.js';
import { AgentQuestionAnswerer, AgentQuestionKind, AgentQuestionStatus, } from '../../../../../packages/core/src/domain/generated/output.js';
const meta = {
    title: 'AgentQuestions/AgentQuestionsInbox',
    component: AgentQuestionsInbox,
    parameters: { layout: 'padded' },
    decorators: [
        (Story) => (_jsx("div", { className: "max-w-3xl", children: _jsx(Story, {}) })),
    ],
};
export default meta;
function question(overrides = {}) {
    return {
        id: 'q-1',
        appId: 'app-1',
        featureId: 'feat-1',
        agentRunId: 'run-abcd1234',
        kind: AgentQuestionKind.question,
        prompt: 'Should we drop the old auth middleware before deploying?',
        optionsJson: JSON.stringify(['yes', 'no']),
        answerer: AgentQuestionAnswerer.user,
        status: AgentQuestionStatus.pending,
        createdAt: '2026-04-29T09:00:00Z',
        updatedAt: '2026-04-29T09:00:00Z',
        ...overrides,
    };
}
export const Empty = {
    args: {
        initialQuestions: [],
    },
};
export const Default = {
    args: {
        initialQuestions: [question()],
    },
};
export const Many = {
    args: {
        initialQuestions: [
            question({
                id: 'q-block',
                kind: AgentQuestionKind.blocking,
                prompt: 'Approve PRD before continuing?',
                optionsJson: JSON.stringify(['approve', 'reject']),
            }),
            question({
                id: 'q-info',
                kind: AgentQuestionKind.info,
                status: AgentQuestionStatus.answered,
                answer: 'noted',
                answeredBy: 'user:web',
                prompt: 'FYI: tests took 22m on the last run.',
            }),
            question({
                id: 'q-free',
                prompt: 'What library should we use for charting?',
                optionsJson: undefined,
            }),
        ],
    },
};
export const Error = {
    args: {
        initialQuestions: [question()],
        errorMessage: 'Failed to submit answer — server returned 500',
    },
};
