import { jsx as _jsx } from "react/jsx-runtime";
import { fn } from '@storybook/test';
import { ModulePanel } from './module-panel.js';
import { ModuleStatus } from '../../../../../../packages/core/src/domain/generated/output.js';
const NOW = new Date();
const mockModules = [
    {
        id: 'm1',
        projectId: 'proj-1',
        name: 'Authentication',
        description: 'User login, signup, and session management',
        status: ModuleStatus.Completed,
        createdAt: NOW,
        updatedAt: NOW,
    },
    {
        id: 'm2',
        projectId: 'proj-1',
        name: 'Dashboard',
        status: ModuleStatus.InProgress,
        createdAt: NOW,
        updatedAt: NOW,
    },
    {
        id: 'm3',
        projectId: 'proj-1',
        name: 'Settings',
        description: 'Application configuration and user preferences',
        status: ModuleStatus.Planned,
        createdAt: NOW,
        updatedAt: NOW,
    },
    {
        id: 'm4',
        projectId: 'proj-1',
        name: 'Notifications',
        status: ModuleStatus.Backlog,
        createdAt: NOW,
        updatedAt: NOW,
    },
];
const meta = {
    title: 'PM/ModulePanel',
    component: ModulePanel,
    parameters: {
        layout: 'padded',
    },
    tags: ['autodocs'],
    args: {
        onModulesChange: fn(),
    },
    decorators: [
        (Story) => (_jsx("div", { className: "w-full max-w-2xl", children: _jsx(Story, {}) })),
    ],
};
export default meta;
export const Default = {
    args: {
        projectId: 'proj-1',
        modules: mockModules,
    },
};
export const SingleModule = {
    args: {
        projectId: 'proj-1',
        modules: [mockModules[0]],
    },
};
export const Empty = {
    args: {
        projectId: 'proj-1',
        modules: [],
    },
};
