import { jsx as _jsx } from "react/jsx-runtime";
import { FeatureTreeTable } from './feature-tree-table.js';
const meta = {
    title: 'Features/FeatureTreeTable',
    component: FeatureTreeTable,
    parameters: {
        layout: 'padded',
    },
    tags: ['autodocs'],
    decorators: [
        (Story) => (_jsx("div", { style: { height: '500px', width: '100%' }, children: _jsx(Story, {}) })),
    ],
};
export default meta;
const singleRepoFeatures = [
    {
        id: 'feat-1',
        name: 'Authentication System',
        status: 'done',
        lifecycle: 'Maintain',
        branch: 'feat/auth-system',
        repositoryName: 'my-app',
        remoteUrl: 'https://github.com/acme/my-app',
    },
    {
        id: 'feat-2',
        name: 'OAuth2 Provider',
        status: 'in-progress',
        lifecycle: 'Implementation',
        branch: 'feat/oauth2-provider',
        repositoryName: 'my-app',
        remoteUrl: 'https://github.com/acme/my-app',
        parentId: 'feat-1',
    },
    {
        id: 'feat-3',
        name: 'JWT Token Refresh',
        status: 'pending',
        lifecycle: 'Planning',
        branch: 'feat/jwt-refresh',
        repositoryName: 'my-app',
        remoteUrl: 'https://github.com/acme/my-app',
        parentId: 'feat-1',
    },
    {
        id: 'feat-4',
        name: 'Payment Integration',
        status: 'action-needed',
        lifecycle: 'Review',
        branch: 'feat/payments',
        repositoryName: 'my-app',
        remoteUrl: 'https://github.com/acme/my-app',
    },
];
const multiRepoFeatures = [
    ...singleRepoFeatures,
    {
        id: 'feat-5',
        name: 'Dashboard Widgets',
        status: 'blocked',
        lifecycle: 'Blocked',
        branch: 'feat/dashboard-widgets',
        repositoryName: 'admin-portal',
        remoteUrl: 'https://github.com/acme/admin-portal',
    },
    {
        id: 'feat-6',
        name: 'Stripe Checkout',
        status: 'error',
        lifecycle: 'Implementation',
        branch: 'feat/stripe-checkout',
        repositoryName: 'admin-portal',
        remoteUrl: 'https://github.com/acme/admin-portal',
    },
    {
        id: 'feat-7',
        name: 'API Gateway',
        status: 'in-progress',
        lifecycle: 'Implementation',
        branch: 'feat/api-gateway',
        repositoryName: 'infrastructure',
        remoteUrl: 'https://gitlab.com/acme/infrastructure',
    },
];
export const Default = {
    args: {
        data: multiRepoFeatures,
    },
};
export const SingleRepository = {
    args: {
        data: singleRepoFeatures,
    },
};
export const Empty = {
    args: {
        data: [],
    },
};
export const WithClickHandler = {
    args: {
        data: multiRepoFeatures,
        onRowClick: (row) => alert(`Clicked: ${row.id}`),
    },
};
const deeplyNestedFeatures = [
    {
        id: 'root-1',
        name: 'Platform Overhaul',
        status: 'in-progress',
        lifecycle: 'Implementation',
        branch: 'feat/platform-overhaul',
        repositoryName: 'platform',
        remoteUrl: 'https://github.com/acme/platform',
    },
    {
        id: 'child-1',
        name: 'API Redesign',
        status: 'in-progress',
        lifecycle: 'Implementation',
        branch: 'feat/api-redesign',
        repositoryName: 'platform',
        remoteUrl: 'https://github.com/acme/platform',
        parentId: 'root-1',
    },
    {
        id: 'grandchild-1',
        name: 'REST to GraphQL Migration',
        status: 'pending',
        lifecycle: 'Planning',
        branch: 'feat/graphql-migration',
        repositoryName: 'platform',
        remoteUrl: 'https://github.com/acme/platform',
        parentId: 'child-1',
    },
    {
        id: 'child-2',
        name: 'Database Migration',
        status: 'done',
        lifecycle: 'Maintain',
        branch: 'feat/db-migration',
        repositoryName: 'platform',
        remoteUrl: 'https://github.com/acme/platform',
        parentId: 'root-1',
    },
];
export const DeeplyNested = {
    args: {
        data: deeplyNestedFeatures,
    },
};
const noRemoteFeatures = [
    {
        id: 'feat-local-1',
        name: 'Local Feature',
        status: 'in-progress',
        lifecycle: 'Implementation',
        branch: 'feat/local-work',
        repositoryName: 'local-project',
    },
];
export const NoRemoteUrl = {
    args: {
        data: noRemoteFeatures,
    },
};
