import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { fn } from '@storybook/test';
import { SidebarProvider, SidebarInset } from '../../ui/sidebar.js';
import { AppSidebar } from './app-sidebar.js';
const defaultFeatureFlags = {
    envDeploy: true,
    debug: false,
    reactFileManager: false,
    projects: false,
    codeReview: false,
    collaboration: false,
    bedrockIntegration: false,
};
const meta = {
    title: 'Layout/AppSidebar',
    component: AppSidebar,
    args: {
        featureFlags: defaultFeatureFlags,
    },
    parameters: {
        layout: 'fullscreen',
    },
    tags: ['autodocs'],
    decorators: [
        (Story, context) => {
            const defaultOpen = context.parameters?.sidebar?.defaultOpen ?? true;
            return (_jsxs(SidebarProvider, { defaultOpen: defaultOpen, children: [_jsx(Story, {}), _jsx(SidebarInset, { "aria-label": "Main content", children: _jsx("div", { className: "flex items-center gap-2 border-b px-4 py-2", children: _jsx("span", { className: "text-muted-foreground text-sm", children: "Content area" }) }) })] }));
        },
    ],
};
export default meta;
const mockFeatures = [
    {
        featureId: 'feat-auth-001',
        name: 'Auth Module',
        status: 'action-needed',
        agentType: 'claude-code',
        modelId: 'claude-sonnet-4-6',
        repositoryPath: '/home/user/projects/my-app',
        repositoryName: 'my-app',
    },
    {
        featureId: 'feat-payment-002',
        name: 'Payment Flow',
        status: 'action-needed',
        agentType: 'cursor',
        modelId: 'claude-opus-4-6',
        repositoryPath: '/home/user/projects/my-app',
        repositoryName: 'my-app',
    },
    {
        featureId: 'feat-dashboard-003',
        name: 'Dashboard',
        status: 'in-progress',
        startedAt: Date.now() - 330_000,
        agentType: 'gemini-cli',
        modelId: 'gemini-2.5-pro',
        repositoryPath: '/home/user/projects/my-app',
        repositoryName: 'my-app',
    },
    {
        featureId: 'feat-api-004',
        name: 'API Gateway',
        status: 'in-progress',
        startedAt: Date.now() - 60_000,
        agentType: 'claude-code',
        modelId: 'claude-haiku-4-5',
        repositoryPath: '/home/user/projects/my-app',
        repositoryName: 'my-app',
    },
    {
        featureId: 'feat-settings-005',
        name: 'Settings Page',
        status: 'done',
        duration: '2h',
        agentType: 'claude-code',
        modelId: 'claude-sonnet-4-6',
        repositoryPath: '/home/user/projects/my-app',
        repositoryName: 'my-app',
    },
    {
        featureId: 'feat-profile-006',
        name: 'User Profile',
        status: 'done',
        duration: '1h',
        agentType: 'dev',
        modelId: 'gpt-8',
        repositoryPath: '/home/user/projects/my-app',
        repositoryName: 'my-app',
    },
];
export const Default = {
    args: {
        features: mockFeatures,
    },
};
export const WithNewFeatureButton = {
    args: {
        features: mockFeatures,
        onAddFeature: fn(),
    },
};
export const Collapsed = {
    args: {
        features: mockFeatures,
    },
    parameters: {
        sidebar: { defaultOpen: false },
    },
};
export const Empty = {
    args: {
        features: [],
    },
};
export const AllInProgress = {
    args: {
        features: [
            {
                featureId: 'feat-a-001',
                name: 'Feature A',
                status: 'in-progress',
                startedAt: Date.now() - 120_000,
                repositoryPath: '/home/user/projects/my-app',
                repositoryName: 'my-app',
            },
            {
                featureId: 'feat-b-002',
                name: 'Feature B',
                status: 'in-progress',
                startedAt: Date.now() - 600_000,
                repositoryPath: '/home/user/projects/my-app',
                repositoryName: 'my-app',
            },
        ],
    },
};
export const AllDone = {
    args: {
        features: [
            {
                featureId: 'feat-a-001',
                name: 'Feature A',
                status: 'done',
                duration: '30m',
                repositoryPath: '/home/user/projects/my-app',
                repositoryName: 'my-app',
            },
            {
                featureId: 'feat-b-002',
                name: 'Feature B',
                status: 'done',
                duration: '1h',
                repositoryPath: '/home/user/projects/my-app',
                repositoryName: 'my-app',
            },
            {
                featureId: 'feat-c-003',
                name: 'Feature C',
                status: 'done',
                duration: '3h',
                repositoryPath: '/home/user/projects/my-app',
                repositoryName: 'my-app',
            },
        ],
    },
};
export const MultipleRepositories = {
    args: {
        features: [
            {
                featureId: 'feat-auth-001',
                name: 'Auth Module',
                status: 'action-needed',
                agentType: 'claude-code',
                modelId: 'claude-sonnet-4-6',
                repositoryPath: '/home/user/projects/frontend',
                repositoryName: 'frontend',
            },
            {
                featureId: 'feat-dashboard-002',
                name: 'Dashboard',
                status: 'in-progress',
                startedAt: Date.now() - 330_000,
                agentType: 'gemini-cli',
                modelId: 'gemini-2.5-pro',
                repositoryPath: '/home/user/projects/frontend',
                repositoryName: 'frontend',
            },
            {
                featureId: 'feat-settings-003',
                name: 'Settings Page',
                status: 'done',
                duration: '2h',
                repositoryPath: '/home/user/projects/frontend',
                repositoryName: 'frontend',
            },
            {
                featureId: 'feat-api-004',
                name: 'API Gateway',
                status: 'in-progress',
                startedAt: Date.now() - 60_000,
                agentType: 'claude-code',
                modelId: 'claude-haiku-4-5',
                repositoryPath: '/home/user/projects/backend',
                repositoryName: 'backend',
            },
            {
                featureId: 'feat-payment-005',
                name: 'Payment Service',
                status: 'action-needed',
                agentType: 'cursor',
                modelId: 'claude-opus-4-6',
                repositoryPath: '/home/user/projects/backend',
                repositoryName: 'backend',
            },
            {
                featureId: 'feat-deploy-006',
                name: 'CI/CD Pipeline',
                status: 'done',
                duration: '45m',
                repositoryPath: '/home/user/projects/infra',
                repositoryName: 'infra',
            },
            {
                featureId: 'feat-monitor-007',
                name: 'Monitoring Setup',
                status: 'in-progress',
                startedAt: Date.now() - 180_000,
                repositoryPath: '/home/user/projects/infra',
                repositoryName: 'infra',
            },
        ],
    },
};
