import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
import { fn } from '@storybook/test';
import { SidebarProvider } from '../../ui/sidebar.js';
import { FeatureListItem } from '../../common/feature-list-item/index.js';
import { FeatureStatusGroup } from '../../common/feature-status-group/index.js';
import { RepoGroup } from './repo-group.js';
const meta = {
    title: 'Composed/RepoGroup',
    component: RepoGroup,
    parameters: {
        layout: 'padded',
    },
    tags: ['autodocs'],
    decorators: [
        (Story) => (_jsx(SidebarProvider, { children: _jsx("div", { className: "w-64", children: _jsx(Story, {}) }) })),
    ],
};
export default meta;
export const Default = {
    args: {
        repoName: 'my-project',
        featureCount: 3,
        children: (_jsxs(_Fragment, { children: [_jsx(FeatureStatusGroup, { label: "In Progress", count: 1, children: _jsx(FeatureListItem, { name: "Dashboard", status: "in-progress", startedAt: Date.now() - 330_000 }) }), _jsxs(FeatureStatusGroup, { label: "Done", count: 2, children: [_jsx(FeatureListItem, { name: "Settings Page", status: "done", duration: "2h" }), _jsx(FeatureListItem, { name: "User Profile", status: "done", duration: "1h" })] })] })),
    },
};
export const SingleFeature = {
    args: {
        repoName: 'backend-api',
        featureCount: 1,
        children: (_jsx(FeatureStatusGroup, { label: "Action Needed", count: 1, children: _jsx(FeatureListItem, { name: "Auth Module", status: "action-needed" }) })),
    },
};
export const Collapsed = {
    args: {
        repoName: 'my-project',
        featureCount: 5,
        defaultOpen: false,
        children: (_jsxs(FeatureStatusGroup, { label: "In Progress", count: 5, children: [_jsx(FeatureListItem, { name: "Feature A", status: "in-progress", startedAt: Date.now() - 60_000 }), _jsx(FeatureListItem, { name: "Feature B", status: "in-progress", startedAt: Date.now() - 120_000 }), _jsx(FeatureListItem, { name: "Feature C", status: "in-progress", startedAt: Date.now() - 180_000 }), _jsx(FeatureListItem, { name: "Feature D", status: "in-progress", startedAt: Date.now() - 240_000 }), _jsx(FeatureListItem, { name: "Feature E", status: "in-progress", startedAt: Date.now() - 300_000 })] })),
    },
};
export const WithAddFeature = {
    args: {
        repoName: 'my-project',
        featureCount: 2,
        onAddFeature: fn(),
        children: (_jsxs(_Fragment, { children: [_jsx(FeatureStatusGroup, { label: "In Progress", count: 1, children: _jsx(FeatureListItem, { name: "Dashboard", status: "in-progress", startedAt: Date.now() - 330_000 }) }), _jsx(FeatureStatusGroup, { label: "Done", count: 1, children: _jsx(FeatureListItem, { name: "Settings Page", status: "done", duration: "2h" }) })] })),
    },
};
export const MultipleRepos = {
    render: () => (_jsxs(_Fragment, { children: [_jsxs(RepoGroup, { repoName: "frontend", featureCount: 2, onAddFeature: fn(), children: [_jsx(FeatureStatusGroup, { label: "In Progress", count: 1, children: _jsx(FeatureListItem, { name: "Dashboard", status: "in-progress", startedAt: Date.now() - 330_000 }) }), _jsx(FeatureStatusGroup, { label: "Done", count: 1, children: _jsx(FeatureListItem, { name: "Settings Page", status: "done", duration: "2h" }) })] }), _jsxs(RepoGroup, { repoName: "backend-api", featureCount: 2, onAddFeature: fn(), children: [_jsx(FeatureStatusGroup, { label: "Action Needed", count: 1, children: _jsx(FeatureListItem, { name: "Auth Module", status: "action-needed" }) }), _jsx(FeatureStatusGroup, { label: "In Progress", count: 1, children: _jsx(FeatureListItem, { name: "API Gateway", status: "in-progress", startedAt: Date.now() - 60_000 }) })] })] })),
};
