import { fn } from '@storybook/test';
import { OpenActionMenu } from './open-action-menu.js';
const defaultActions = {
    openInIde: fn().mockName('openInIde'),
    openInShell: fn().mockName('openInShell'),
    openFolder: fn().mockName('openFolder'),
    openSpecsFolder: fn().mockName('openSpecsFolder'),
    rebaseOnMain: fn().mockName('rebaseOnMain'),
    ideLoading: false,
    shellLoading: false,
    folderLoading: false,
    specsLoading: false,
    rebaseLoading: false,
    ideError: null,
    shellError: null,
    folderError: null,
    specsError: null,
    rebaseError: null,
};
const meta = {
    title: 'Composed/OpenActionMenu',
    component: OpenActionMenu,
    tags: ['autodocs'],
    parameters: {
        layout: 'centered',
    },
};
export default meta;
/** Default menu with all actions including specs folder. */
export const Default = {
    args: {
        actions: defaultActions,
        repositoryPath: '/Users/dev/my-project',
        showSpecs: true,
    },
};
/** Menu without specs folder action. */
export const WithoutSpecs = {
    args: {
        actions: defaultActions,
        repositoryPath: '/Users/dev/my-project',
        showSpecs: false,
    },
};
/** Menu while IDE action is loading. */
export const Loading = {
    args: {
        actions: { ...defaultActions, ideLoading: true },
        repositoryPath: '/Users/dev/my-project',
        showSpecs: true,
    },
};
/** Menu with an error on the IDE action. */
export const WithError = {
    args: {
        actions: { ...defaultActions, ideError: 'Editor not found' },
        repositoryPath: '/Users/dev/my-project',
        showSpecs: true,
    },
};
/** Menu with a worktree path — Copy path copies the worktree path. */
export const WithWorktreePath = {
    args: {
        actions: defaultActions,
        repositoryPath: '/Users/dev/my-project',
        worktreePath: '/Users/dev/my-project/.worktrees/feature-add-login',
        showSpecs: true,
    },
};
