import { jsx as _jsx } from "react/jsx-runtime";
import * as React from 'react';
import { fn } from '@storybook/test';
import { AgentModelPicker } from './index.js';
const meta = {
    title: 'Features/Settings/AgentModelPicker',
    component: AgentModelPicker,
    parameters: { layout: 'centered' },
    tags: ['autodocs'],
    decorators: [
        (Story) => (_jsx("div", { className: "w-80", children: _jsx(Story, {}) })),
    ],
    args: {
        onAgentModelChange: fn(),
    },
};
export default meta;
function ParentDrivenSelectionDemo(props) {
    const [selection, setSelection] = React.useState({
        agentType: props.initialAgentType,
        model: props.initialModel,
    });
    return (_jsx(AgentModelPicker, { ...props, agentType: selection.agentType, model: selection.model, onSave: async (agentType, model) => {
            setSelection({ agentType, model });
            return { ok: true };
        } }));
}
export const ClaudeCodeDefault = {
    args: {
        initialAgentType: 'claude-code',
        initialModel: 'claude-sonnet-4-6',
        mode: 'settings',
    },
};
export const CursorSelected = {
    args: {
        initialAgentType: 'cursor',
        initialModel: 'gpt-5.4-high',
        mode: 'settings',
    },
};
export const GeminiCli = {
    args: {
        initialAgentType: 'gemini-cli',
        initialModel: 'gemini-2.5-pro',
        mode: 'settings',
    },
};
export const CodexCliSelected = {
    args: {
        initialAgentType: 'codex-cli',
        initialModel: 'gpt-5.4',
        mode: 'settings',
    },
};
export const DemoAgent = {
    args: {
        initialAgentType: 'dev',
        initialModel: '',
        mode: 'settings',
    },
};
export const CopilotCli = {
    args: {
        initialAgentType: 'copilot-cli',
        initialModel: 'claude-sonnet-4.5',
        mode: 'settings',
    },
};
export const OverrideMode = {
    args: {
        initialAgentType: 'claude-code',
        initialModel: 'claude-sonnet-4-6',
        mode: 'override',
    },
};
export const Disabled = {
    args: {
        initialAgentType: 'claude-code',
        initialModel: 'claude-sonnet-4-6',
        mode: 'settings',
        disabled: true,
    },
};
export const SavingState = {
    args: {
        initialAgentType: 'codex-cli',
        initialModel: 'gpt-5.4',
        mode: 'settings',
        saving: true,
    },
};
export const ParentDrivenSelection = {
    render: (args) => (_jsx(ParentDrivenSelectionDemo, { ...args })),
    args: {
        initialAgentType: 'claude-code',
        initialModel: 'claude-sonnet-4-6',
        mode: 'settings',
    },
};
