"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RadioGroupStories = 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 RadioGroupFormControl_1 = require("../Web/RadioGroupFormControl");
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 radiogroup = new RadioGroupFormControl_1.RadioGroupFormControl();
    radiogroup.valueName = "radio";
    radiogroup.list = [
        "Operator",
        "Manager",
        "Administration",
        "UX/UI designer",
        "Back-end developer",
        "Project-manager",
    ];
    container.add(radiogroup);
    return { form: ui, control: radiogroup };
}
exports.RadioGroupStories = [
    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", "Radio Group", "Default"),
    new StoryData_1.StoryNode(() => {
        let ui = getUI();
        ui.control.label = "With Value";
        let data = new ExecutionData_1.ExecutionData();
        data.values["radio"] = "Operator";
        return (0, jsx_runtime_1.jsx)(FormRuntime_1.FormRuntime, { form: ui.form, formData: data });
    }, "Form Designer", "Controls", "Radio Group", "With Value"),
    new StoryData_1.StoryNode(() => {
        let ui = getUI();
        let data = new ExecutionData_1.ExecutionData();
        ui.control.label = "With Checkbox";
        ui.control.styleType = RadioGroupFormControl_1.IRadioStyleType.CHECKBOX;
        data = new ExecutionData_1.ExecutionData();
        data.values["radio"] = "Operator";
        return (0, jsx_runtime_1.jsx)(FormRuntime_1.FormRuntime, { form: ui.form, formData: data });
    }, "Form Designer", "Controls", "Radio Group", "With Checkbox"),
];
//# sourceMappingURL=XRadioGroup-stories.js.map