import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
import { BlockNoteEditor, BlockNoteSchema, defaultInlineContentSpecs, uploadToTmpFilesDotOrg_DEV_ONLY, } from "@endexai/blocknote-core";
import { createReactInlineContentSpec } from "../../schema/ReactInlineContentSpec.js";
const mention = createReactInlineContentSpec({
    type: "mention",
    propSchema: {
        user: {
            default: "",
        },
    },
    content: "none",
}, {
    render: (props) => {
        return _jsxs("span", { children: ["@", props.inlineContent.props.user] });
    },
});
const tag = createReactInlineContentSpec({
    type: "tag",
    propSchema: {},
    content: "styled",
}, {
    render: (props) => {
        return (_jsxs("span", { children: ["#", _jsx("span", { ref: props.contentRef })] }));
    },
});
const schema = BlockNoteSchema.create({
    inlineContentSpecs: {
        ...defaultInlineContentSpecs,
        tag,
        mention,
    },
});
export const customReactInlineContentTestCases = {
    name: "custom react inline content schema",
    createEditor: () => {
        return BlockNoteEditor.create({
            uploadFile: uploadToTmpFilesDotOrg_DEV_ONLY,
            schema,
        });
    },
    documents: [
        {
            name: "mention/basic",
            blocks: [
                {
                    type: "paragraph",
                    content: [
                        "I enjoy working with ",
                        {
                            type: "mention",
                            props: {
                                user: "Matthew",
                            },
                            content: undefined,
                        },
                    ],
                },
            ],
        },
        {
            name: "tag/basic",
            blocks: [
                {
                    type: "paragraph",
                    content: [
                        "I love ",
                        {
                            type: "tag",
                            // props: {},
                            content: "BlockNote",
                        },
                    ],
                },
            ],
        },
    ],
};
//# sourceMappingURL=customReactInlineContent.js.map