"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ValueSliderStories = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const FormRuntime_1 = require("../../FormRuntime");
const ValueSliderFormControl_1 = require("../Web/ValueSliderFormControl");
const Containers_1 = require("../../Containers");
const FormConfiguration_1 = require("../../FormConfiguration");
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 valueSlider = new ValueSliderFormControl_1.ValueSliderFormControl();
    valueSlider.label = " Value Slider With String";
    valueSlider.valueName = "valueSlider";
    valueSlider.sliderValues = ["Pizza", "Beer", "Fruits", "Kale"];
    container.add(valueSlider);
    return { form: ui, control: valueSlider };
}
exports.ValueSliderStories = [
    new StoryData_1.StoryNode(() => {
        let ui = getUI();
        let data = new ExecutionData_1.ExecutionData();
        data.values[ui.control.valueName] = "Fruits";
        return (0, jsx_runtime_1.jsx)(FormRuntime_1.FormRuntime, { form: ui.form, formData: data });
    }, "Form Designer", "Controls", "Value Slider", "Default"),
    new StoryData_1.StoryNode(() => {
        let ui = getUI();
        let data = new ExecutionData_1.ExecutionData();
        data.values[ui.control.valueName] = "Fruits";
        ui.control.labelSize = 15;
        return (0, jsx_runtime_1.jsx)(FormRuntime_1.FormRuntime, { form: ui.form, formData: data });
    }, "Form Designer", "Controls", "Value Slider", "Label Size"),
    new StoryData_1.StoryNode(() => {
        let ui = getUI();
        let data = new ExecutionData_1.ExecutionData();
        data.values[ui.control.valueName] = "Fruits";
        ui.control.selectValuesToLeft = true;
        return (0, jsx_runtime_1.jsx)(FormRuntime_1.FormRuntime, { form: ui.form, formData: data });
    }, "Form Designer", "Controls", "Value Slider", "Select Values To Left"),
    new StoryData_1.StoryNode(() => {
        let ui = getUI();
        let data = new ExecutionData_1.ExecutionData();
        ui.control.isDynamic = true;
        ui.control.stepsValueName = "stepsValues";
        data.values["stepsValues"] = ["Beginner", "Junior", "Senior", "Master"];
        data.values["valueSlider"] = "Senior";
        return (0, jsx_runtime_1.jsx)(FormRuntime_1.FormRuntime, { form: ui.form, formData: data });
    }, "Form Designer", "Controls", "Value Slider", "Steps From Data"),
    new StoryData_1.StoryNode(() => {
        let ui = getUI();
        let data = new ExecutionData_1.ExecutionData();
        ui.control.isDynamic = true;
        ui.control.selectValuesToLeft = true;
        ui.control.stepsValueName = "stepsValues";
        data.values["stepsValues"] = ["Beginner", "Junior", "Senior", "Master"];
        data.values["valueSlider"] = "Senior";
        return (0, jsx_runtime_1.jsx)(FormRuntime_1.FormRuntime, { form: ui.form, formData: data });
    }, "Form Designer", "Controls", "Value Slider", "Steps From Data With Select Left"),
];
//# sourceMappingURL=XValueSlider-stories.js.map