"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FormTester = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const XExecutableTester_1 = require("../XExecutableTester");
const DataDefinition_1 = require("@appglue/common/dist/Common/Data/DataDefinition");
const StringDataDefinition_1 = require("@appglue/common/dist/Common/Data/Definitions/StringDataDefinition");
const BooleanDataDefinition_1 = require("@appglue/common/dist/Common/Data/Definitions/BooleanDataDefinition");
const NumberDataDefinition_1 = require("@appglue/common/dist/Common/Data/Definitions/NumberDataDefinition");
const FormConfiguration_1 = require("../../../Form/FormConfiguration");
const HeadingFormControl_1 = require("../../../Form/Controls/Web/HeadingFormControl");
const Containers_1 = require("../../../Form/Containers");
const TextFormControl_1 = require("../../../Form/Controls/Web/TextFormControl");
const SwitchFormControl_1 = require("../../../Form/Controls/Web/SwitchFormControl");
const NumberFormControl_1 = require("../../../Form/Controls/Web/NumberFormControl");
const ButtonFormControl_1 = require("../../../Form/Controls/Web/ButtonFormControl");
const StoryData_1 = require("../../StoryBook/StoryData");
let heading = new HeadingFormControl_1.HeadingFormControl();
heading.text = "Form Tester";
heading.type = "h3";
let container = new Containers_1.XStackContainer();
let firstName = new TextFormControl_1.TextFormControl();
firstName.label = "first name";
firstName.valueName = "firstName";
let lastName = new TextFormControl_1.TextFormControl();
lastName.label = "last name";
lastName.valueName = "lastName";
let fulltime = new SwitchFormControl_1.SwitchFormControl();
fulltime.label = "fulltime";
fulltime.valueName = "fulltime";
let age = new NumberFormControl_1.NumberFormControl();
age.label = "age";
age.valueName = "age";
container.add(heading);
container.add(firstName);
container.add(lastName);
container.add(fulltime);
container.add(age);
let buttonContainer = new Containers_1.XHStackContainer();
let button = new ButtonFormControl_1.ButtonFormControl();
button.label = "Submit";
let button2 = new ButtonFormControl_1.ButtonFormControl();
button2.label = "Cancel";
buttonContainer.add(button);
buttonContainer.add(button2);
let form = new FormConfiguration_1.FormConfiguration([container, buttonContainer]);
let def = new DataDefinition_1.DataDefinition();
def.fields.push(new StringDataDefinition_1.StringDataDefinition("firstName"));
def.fields.push(new StringDataDefinition_1.StringDataDefinition("lastName"));
def.fields.push(new BooleanDataDefinition_1.BooleanDataDefinition("fulltime"));
def.fields.push(new NumberDataDefinition_1.NumberDataDefinition("age"));
form.inputData = def;
exports.FormTester = [
    new StoryData_1.StoryNode(() => {
        return (0, jsx_runtime_1.jsx)(XExecutableTester_1.XExecutableTester, { executable: form });
    }, "Executable Tester", "Form", "Default"),
];
//# sourceMappingURL=XExecutableTester.Form-stories.js.map