"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LabelStories = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const FormConfiguration_1 = require("../../FormConfiguration");
const FormRuntime_1 = require("../../FormRuntime");
const LabelFormControl_1 = require("../Web/LabelFormControl");
const Containers_1 = require("../../Containers");
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();
    const label = new LabelFormControl_1.LabelFormControl();
    container.add(label);
    ui.add(container);
    return { form: ui, control: label };
}
exports.LabelStories = [
    new StoryData_1.StoryNode(() => {
        let ui = getUI();
        return (0, jsx_runtime_1.jsx)(FormRuntime_1.FormRuntime, { form: ui.form });
    }, "Form Designer", "Controls", "Label", "Default"),
    new StoryData_1.StoryNode(() => {
        let ui = getUI();
        ui.control.text = "This is long text";
        ui.control.maxLength = 5;
        return (0, jsx_runtime_1.jsx)(FormRuntime_1.FormRuntime, { form: ui.form });
    }, "Form Designer", "Controls", "Label", "Max Length"),
    new StoryData_1.StoryNode(() => {
        let ui = getUI();
        ui.control.fromData = true;
        ui.control.valueName = "label";
        const data = new ExecutionData_1.ExecutionData();
        data.values["label"] = "This is long text";
        return (0, jsx_runtime_1.jsx)(FormRuntime_1.FormRuntime, { form: ui.form, formData: data });
    }, "Form Designer", "Controls", "Label", "From Data"),
];
//# sourceMappingURL=XLabel-stories.js.map