"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CheckBoxStories = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const Containers_1 = require("../../Containers");
const FormConfiguration_1 = require("../../FormConfiguration");
const FormRuntime_1 = require("../../FormRuntime");
const CheckboxFormControl_1 = require("../Web/CheckboxFormControl");
const ExecutionData_1 = require("@appglue/common/dist/Common/Data/ExecutionData/ExecutionData");
const StoryData_1 = require("../../../CommonUI/StoryBook/StoryData");
function getUI() {
    let ui = new FormConfiguration_1.FormConfiguration();
    let container = new Containers_1.XStackContainer();
    ui.add(container);
    let checkbox = new CheckboxFormControl_1.CheckboxFormControl();
    container.add(checkbox);
    return { form: ui, control: checkbox };
}
exports.CheckBoxStories = [
    new StoryData_1.StoryNode(() => {
        let ui = getUI();
        ui.control.label = "Default Control";
        return (0, jsx_runtime_1.jsx)(FormRuntime_1.FormRuntime, { form: ui.form });
    }, "Form Designer", "Controls", "Checkbox", "Default"),
    new StoryData_1.StoryNode(() => {
        let ui = getUI();
        ui.control.label = "Default As true";
        ui.control.defaultValue = true;
        return (0, jsx_runtime_1.jsx)(FormRuntime_1.FormRuntime, { form: ui.form });
    }, "Form Designer", "Controls", "Checkbox", "Default To True"),
    new StoryData_1.StoryNode(() => {
        let ui = getUI();
        ui.control.label = "From Data";
        ui.control.valueName = "checkbox";
        let data = new ExecutionData_1.ExecutionData();
        data.values[ui.control.valueName] = true;
        return (0, jsx_runtime_1.jsx)(FormRuntime_1.FormRuntime, { form: ui.form, formData: data });
    }, "Form Designer", "Controls", "Checkbox", "From Data"),
];
//# sourceMappingURL=XCheckboxField-stories.js.map