import { PageEditor } from './page-editor.js';
const meta = {
    title: 'PM/PageEditor',
    component: PageEditor,
    parameters: { layout: 'padded' },
    tags: ['autodocs'],
};
export default meta;
const sampleContent = JSON.stringify({
    type: 'doc',
    content: [
        {
            type: 'heading',
            attrs: { level: 1 },
            content: [{ type: 'text', text: 'Getting Started' }],
        },
        {
            type: 'paragraph',
            content: [
                { type: 'text', text: 'Welcome to the project wiki. This is a ' },
                { type: 'text', marks: [{ type: 'bold' }], text: 'rich text editor' },
                { type: 'text', text: ' with support for formatting, lists, and more.' },
            ],
        },
        {
            type: 'bulletList',
            content: [
                {
                    type: 'listItem',
                    content: [
                        {
                            type: 'paragraph',
                            content: [{ type: 'text', text: 'Bold, italic, and strikethrough' }],
                        },
                    ],
                },
                {
                    type: 'listItem',
                    content: [{ type: 'paragraph', content: [{ type: 'text', text: 'Headings (H1-H3)' }] }],
                },
                {
                    type: 'listItem',
                    content: [
                        {
                            type: 'paragraph',
                            content: [{ type: 'text', text: 'Code blocks with syntax highlighting' }],
                        },
                    ],
                },
            ],
        },
    ],
});
const noop = (_content) => {
    /* no-op for storybook */
};
export const Default = {
    args: {
        content: sampleContent,
        onUpdate: noop,
    },
};
export const Empty = {
    args: {
        content: '',
        onUpdate: noop,
    },
};
export const ReadOnly = {
    args: {
        content: sampleContent,
        onUpdate: noop,
        editable: false,
    },
};
