import { jsx as _jsx } from "react/jsx-runtime";
import { fn } from '@storybook/test';
import { BranchSyncStatus } from './branch-sync-status.js';
const meta = {
    title: 'Drawers/Feature/Tabs/BranchSyncStatus',
    component: BranchSyncStatus,
    tags: ['autodocs'],
    parameters: {
        layout: 'fullscreen',
    },
    decorators: [
        (Story) => (_jsx("div", { style: { height: '200px', width: '400px', border: '1px solid var(--color-border)' }, children: _jsx(Story, {}) })),
    ],
    args: {
        onRefreshSync: fn(),
        onRebaseOnMain: fn(),
        rebaseLoading: false,
        rebaseError: null,
    },
};
export default meta;
export const Loading = {
    args: {
        syncStatus: null,
        syncLoading: true,
        syncError: null,
    },
};
export const UpToDate = {
    args: {
        syncStatus: { ahead: 3, behind: 0, baseBranch: 'main', checkedAt: new Date().toISOString() },
        syncLoading: false,
        syncError: null,
    },
};
export const UpToDateNoAhead = {
    args: {
        syncStatus: { ahead: 0, behind: 0, baseBranch: 'main', checkedAt: new Date().toISOString() },
        syncLoading: false,
        syncError: null,
    },
};
export const Behind = {
    args: {
        syncStatus: { ahead: 5, behind: 3, baseBranch: 'main', checkedAt: new Date().toISOString() },
        syncLoading: false,
        syncError: null,
    },
};
export const BehindOneCommit = {
    args: {
        syncStatus: { ahead: 0, behind: 1, baseBranch: 'main', checkedAt: new Date().toISOString() },
        syncLoading: false,
        syncError: null,
    },
};
export const Rebasing = {
    args: {
        syncStatus: { ahead: 5, behind: 3, baseBranch: 'main', checkedAt: new Date().toISOString() },
        syncLoading: false,
        syncError: null,
        rebaseLoading: true,
    },
};
export const RebaseError = {
    args: {
        syncStatus: { ahead: 5, behind: 3, baseBranch: 'main', checkedAt: new Date().toISOString() },
        syncLoading: false,
        syncError: null,
        rebaseError: 'Rebase failed: working directory has uncommitted changes',
    },
};
export const FetchError = {
    args: {
        syncStatus: null,
        syncLoading: false,
        syncError: 'Failed to check sync status',
    },
};
export const Refreshing = {
    args: {
        syncStatus: { ahead: 3, behind: 0, baseBranch: 'main', checkedAt: new Date().toISOString() },
        syncLoading: true,
        syncError: null,
    },
};
