import { jsx as _jsx } from "react/jsx-runtime";
import { PromptEditor } from './prompt-editor.js';
const meta = {
    title: 'AgentEditor/PromptEditor',
    component: PromptEditor,
    parameters: { layout: 'padded' },
    decorators: [
        (Story) => (_jsx("div", { className: "max-w-2xl", children: _jsx(Story, {}) })),
    ],
};
export default meta;
const sampleEntries = [
    {
        agentType: 'supervisor-agent',
        promptId: 'evaluator.system',
        name: 'Evaluator system header',
        description: 'Hard rules every supervisor evaluation prepends.',
        bundledBody: 'You are a delegated supervisor agent...',
        effectiveBody: 'You are a delegated supervisor agent...',
        hasOverride: false,
    },
    {
        agentType: 'supervisor-agent',
        promptId: 'reviewer.system',
        name: 'Reviewer system header',
        description: 'Used when the supervisor reviews an outgoing PR.',
        bundledBody: 'You are reviewing a pull request...',
        effectiveBody: 'You are reviewing a pull request — be especially strict on migrations.',
        hasOverride: true,
    },
];
export const Default = {
    args: {
        entries: sampleEntries,
        onSaveOverride: async () => ({ ok: true }),
        onResetOverride: async () => ({ ok: true }),
    },
};
export const Empty = {
    args: {
        entries: [],
        onSaveOverride: async () => ({ ok: true }),
        onResetOverride: async () => ({ ok: true }),
    },
};
export const SaveError = {
    args: {
        entries: sampleEntries,
        onSaveOverride: async () => ({ ok: false, error: 'Failed to save: 503 Service Unavailable' }),
        onResetOverride: async () => ({ ok: true }),
    },
};
