"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SignaturePadStories = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const FormConfiguration_1 = require("../../FormConfiguration");
const FormRuntime_1 = require("../../FormRuntime");
const SignaturePadFormControl_1 = require("../Web/SignaturePadFormControl");
const Containers_1 = require("../../Containers");
const LabelFormControl_1 = require("../Web/LabelFormControl");
const StoryData_1 = require("../../../CommonUI/StoryBook/StoryData");
function getUI() {
    let ui = new FormConfiguration_1.FormConfiguration();
    let container = new Containers_1.XColumnContainer();
    let col = new Containers_1.XColumnContainerColumn();
    container.add(col);
    ui.add(container);
    let label = new LabelFormControl_1.LabelFormControl();
    label.text = "Signature Required";
    col.add(label);
    let signaturePad = new SignaturePadFormControl_1.SignaturePadFormControl();
    signaturePad.label = "SignaturePad Field Label";
    signaturePad.valueName = "value";
    signaturePad.requiredOnAllOutcomes = false;
    col.add(signaturePad);
    return { form: ui };
}
exports.SignaturePadStories = [
    new StoryData_1.StoryNode(() => {
        let ui = getUI();
        return (0, jsx_runtime_1.jsx)(FormRuntime_1.FormRuntime, { form: ui.form });
    }, "Form Designer", "Controls", "Signature Pad", "Default"),
    new StoryData_1.StoryNode(() => {
        let ui = getUI();
        let controls = ui.form.getAllControls();
        for (let c of controls) {
            let ctf = c;
            if (ctf) {
                ctf.requiredOnAllOutcomes = true;
            }
        }
        return (0, jsx_runtime_1.jsx)(FormRuntime_1.FormRuntime, { form: ui.form });
    }, "Form Designer", "Controls", "Signature Pad", "Validation Breaks"),
];
//# sourceMappingURL=XSignaturePad-stories.js.map