import { jsx as _jsx } from "react/jsx-runtime";
import NoteEditor from '../components/NoteEditor';
import { useState } from 'react';
const meta = {
    title: 'Components/NoteEditor',
    component: NoteEditor,
    parameters: {
        layout: 'centered',
    },
    tags: ['autodocs'],
    argTypes: {
        value: {
            control: 'text',
            description: 'The current text value of the editor',
        },
        isDisabled: {
            control: 'boolean',
            description: 'Whether the editor is disabled',
        },
        isLoading: {
            control: 'boolean',
            description: 'Whether the editor is loading',
        },
        notesLoading: {
            control: 'boolean',
            description: 'Whether notes are loading',
        },
        contributors: {
            control: 'object',
            description: 'List of contributors',
        },
    },
};
export default meta;
// Template component for stories that need state management
const NoteEditorWithState = (args) => {
    const [value, setValue] = useState(args.value || '');
    return (_jsx("div", { style: { width: '800px', height: '600px' }, children: _jsx(NoteEditor, { ...args, value: value, handleChange: setValue }) }));
};
export const Default = {
    render: NoteEditorWithState,
    args: {
        value: '',
        isDisabled: false,
        isLoading: false,
        notesLoading: false,
    },
};
export const WithInitialContent = {
    render: NoteEditorWithState,
    args: {
        value: 'This is some initial content in the note editor. You can format it with **bold**, *italic*, and __underline__ text.',
        isDisabled: false,
        isLoading: false,
        notesLoading: false,
    },
};
export const WithRichContent = {
    render: NoteEditorWithState,
    args: {
        value: `# Meeting Notes

## Agenda Items
- Review project progress
- Discuss next steps
- **Action items**

### Key Points
1. First important point
2. Second important point
3. Third important point

Some additional notes with *emphasis* and __underline__ formatting.

## Follow-up Tasks
- [ ] Task 1
- [ ] Task 2
- [ ] Task 3`,
        isDisabled: false,
        isLoading: false,
        notesLoading: false,
    },
};
export const WithContributors = {
    render: NoteEditorWithState,
    args: {
        value: 'This note has multiple contributors.',
        isDisabled: false,
        isLoading: false,
        notesLoading: false,
        contributors: ['John Doe', 'Jane Smith', 'Bob Johnson'],
    },
};
export const WithManyContributors = {
    render: NoteEditorWithState,
    args: {
        value: 'This note has many contributors.',
        isDisabled: false,
        isLoading: false,
        notesLoading: false,
        contributors: ['John Doe', 'Jane Smith', 'Bob Johnson', 'Alice Brown', 'Charlie Wilson'],
    },
};
export const Disabled = {
    render: NoteEditorWithState,
    args: {
        value: 'This editor is disabled and cannot be edited.',
        isDisabled: true,
        isLoading: false,
        notesLoading: false,
    },
};
export const Loading = {
    render: NoteEditorWithState,
    args: {
        value: 'This editor is in loading state.',
        isDisabled: false,
        isLoading: true,
        notesLoading: false,
    },
};
export const NotesLoading = {
    render: NoteEditorWithState,
    args: {
        value: 'Notes are loading...',
        isDisabled: false,
        isLoading: false,
        notesLoading: true,
    },
};
