"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DataDefinitionEditorStories = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
// also exported from '@storybook/react' if you can deal with breaking changes in 6.1
const DataTestData_1 = require("@appglue/common/dist/Common/Data/DataTestData");
const TestData_1 = require("../CommonUI/DataEditing/Testing/TestData");
const DataBuilder_1 = require("./DataBuilder");
const FileDataDefinition_1 = require("@appglue/common/dist/Common/Data/Definitions/FileDataDefinition");
const StoryData_1 = require("../CommonUI/StoryBook/StoryData");
exports.DataDefinitionEditorStories = [
    new StoryData_1.StoryNode(() => {
        let def = (0, DataTestData_1.getEmptyDataDefinition)();
        return (0, jsx_runtime_1.jsx)(DataBuilder_1.DataBuilder, { definition: def });
    }, "Data Designer", "Designer", "Empty"),
    new StoryData_1.StoryNode(() => {
        let def = (0, DataTestData_1.getFilledDataDefinition)();
        return (0, jsx_runtime_1.jsx)(DataBuilder_1.DataBuilder, { definition: def });
    }, "Data Designer", "Designer", "With Data"),
    new StoryData_1.StoryNode(() => {
        let def = (0, DataTestData_1.getFilledDataDefinition)();
        let filedef = new FileDataDefinition_1.FileDataDefinition();
        filedef.name = "photo";
        def.fields.push(filedef);
        return (0, jsx_runtime_1.jsx)(DataBuilder_1.DataBuilder, { definition: def });
    }, "Data Designer", "Designer", "With File"),
    new StoryData_1.StoryNode(() => {
        let def = (0, DataTestData_1.getFilledDataDefinition)();
        let samedef = new FileDataDefinition_1.FileDataDefinition("person");
        def.fields.push(samedef);
        return (0, jsx_runtime_1.jsx)(DataBuilder_1.DataBuilder, { definition: def });
    }, "Data Designer", "Designer", "Duplicated Fields"),
    new StoryData_1.StoryNode(() => {
        let def = (0, DataTestData_1.getFilledDataDefinition)();
        let emptyfield = new FileDataDefinition_1.FileDataDefinition();
        def.fields.push(emptyfield);
        return (0, jsx_runtime_1.jsx)(DataBuilder_1.DataBuilder, { definition: def });
    }, "Data Designer", "Designer", "No Name Field"),
    new StoryData_1.StoryNode(() => {
        let def = (0, DataTestData_1.getFilledDataDefinition)();
        return (0, jsx_runtime_1.jsx)(DataBuilder_1.DataBuilder, { definition: def, readOnly: true });
    }, "Data Designer", "Designer", "Readonly"),
    new StoryData_1.StoryNode(() => {
        let def = (0, TestData_1.getOnePersonWithFriends)();
        return (0, jsx_runtime_1.jsx)(DataBuilder_1.DataBuilder, { definition: def });
    }, "Data Designer", "Designer", "With Friends"),
    new StoryData_1.StoryNode(() => {
        let def = (0, TestData_1.getFamilyAddress)();
        return (0, jsx_runtime_1.jsx)(DataBuilder_1.DataBuilder, { definition: def });
    }, "Data Designer", "Designer", "Family Address"),
];
//# sourceMappingURL=DataBuilder-stories.js.map