"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TextMergeTester = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const XExecutableTester_1 = require("../XExecutableTester");
const TextMergeConfiguration_1 = require("@appglue/common/dist/TextMerge/TextMergeConfiguration");
const DataTestData_1 = require("@appglue/common/dist/Common/Data/DataTestData");
const TextMergeConstants_1 = require("@appglue/common/dist/TextMerge/TextMergeConstants");
const StoryData_1 = require("../../StoryBook/StoryData");
exports.TextMergeTester = [
    new StoryData_1.StoryNode(() => {
        let value = {
            blocks: [
                {
                    key: "558fp",
                    text: "Welcome   to our  ",
                    type: "unstyled",
                    depth: 0,
                    inlineStyleRanges: [],
                    entityRanges: [
                        { offset: 8, length: 1, key: 0 },
                        { offset: 17, length: 1, key: 1 },
                    ],
                    data: {},
                },
            ],
            entityMap: {
                "0": {
                    type: TextMergeConstants_1.TextMergeConstants.MERGE_TEXT_ENTITY_TYPE,
                    mutability: "IMMUTABLE",
                    data: {
                        fieldpath: "name",
                        field: {
                            type: "string",
                            name: "name",
                            list: false,
                            valueIsDefault: false,
                            validValues: [],
                        },
                    },
                },
                "1": {
                    type: TextMergeConstants_1.TextMergeConstants.MERGE_TEXT_ENTITY_TYPE,
                    mutability: "IMMUTABLE",
                    data: {
                        fieldpath: "job",
                        field: {
                            type: "string",
                            name: "job",
                            list: false,
                            valueIsDefault: false,
                            validValues: [],
                        },
                    },
                },
            },
        };
        let definition = new TextMergeConfiguration_1.TextMergeConfiguration();
        definition.setValue(value);
        definition.inputData = (0, DataTestData_1.getMergeEditorDataDefinition)();
        return (0, jsx_runtime_1.jsx)(XExecutableTester_1.XExecutableTester, { executable: definition });
    }, "Test UI", "Text Merge", "Default"),
    new StoryData_1.StoryNode(() => {
        let value = {
            blocks: [
                {
                    key: "558fp",
                    text: "Welcome to our House",
                    type: "unstyled",
                    depth: 0,
                    inlineStyleRanges: [],
                    entityRanges: [],
                    data: {},
                },
            ],
            entityMap: {
                "0": {
                    type: TextMergeConstants_1.TextMergeConstants.MERGE_TEXT_ENTITY_TYPE,
                    mutability: "IMMUTABLE",
                    data: {
                        fieldpath: "name",
                        field: {
                            type: "string",
                            name: "name",
                            list: false,
                            valueIsDefault: false,
                            validValues: [],
                        },
                    },
                },
                "1": {
                    type: TextMergeConstants_1.TextMergeConstants.MERGE_TEXT_ENTITY_TYPE,
                    mutability: "IMMUTABLE",
                    data: {
                        fieldpath: "job",
                        field: {
                            type: "string",
                            name: "job",
                            list: false,
                            valueIsDefault: false,
                            validValues: [],
                        },
                    },
                },
            },
        };
        let definition = new TextMergeConfiguration_1.TextMergeConfiguration();
        definition.setValue(value);
        definition.inputData = (0, DataTestData_1.getMergeEditorDataDefinition)();
        return (0, jsx_runtime_1.jsx)(XExecutableTester_1.XExecutableTester, { executable: definition });
    }, "Test UI", "Text Merge", "No Variable"),
];
//# sourceMappingURL=XExecutableTester.TextMerge-stories.js.map