"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ContainerTabStories = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const FormConfiguration_1 = require("../FormConfiguration");
const FormRuntime_1 = require("../FormRuntime");
const TextFormControl_1 = require("../Controls/Web/TextFormControl");
const XTabContainer_1 = require("./XTabContainer");
const FormDesignConstants_1 = require("../Utilities/FormDesignConstants");
const DefaultOnOff_1 = require("../Utilities/DefaultOnOff");
const StoryData_1 = require("../../CommonUI/StoryBook/StoryData");
function getUI() {
    let ui = new FormConfiguration_1.FormConfiguration();
    let tabContainer = new XTabContainer_1.XTabContainer();
    let tabContainerTab = new XTabContainer_1.XTabContainerTab();
    tabContainer.overrideFormBorderSettings = DefaultOnOff_1.DefaultOnOff.On;
    let tabContainerTabContent = new XTabContainer_1.XTabContainerTabContent();
    let tabContainerTabHeader = new XTabContainer_1.XTabContainerTabHeader();
    tabContainerTabHeader.title = "Test 1";
    tabContainerTab.setContent(tabContainerTabContent);
    tabContainerTab.setHeader(tabContainerTabHeader);
    let tabContainerTab2 = new XTabContainer_1.XTabContainerTab();
    let tabContainerTabContent2 = new XTabContainer_1.XTabContainerTabContent();
    let tabContainerTabHeader2 = new XTabContainer_1.XTabContainerTabHeader();
    tabContainerTabHeader2.title = "Test 2";
    tabContainerTab2.setContent(tabContainerTabContent2);
    tabContainerTab2.setHeader(tabContainerTabHeader2);
    tabContainer.addTab(tabContainerTab);
    tabContainer.addTab(tabContainerTab2);
    ui.add(tabContainer);
    return { form: ui, container: tabContainer };
}
exports.ContainerTabStories = [
    new StoryData_1.StoryNode(() => {
        let ui = getUI();
        return (0, jsx_runtime_1.jsx)(FormRuntime_1.FormRuntime, { form: ui.form });
    }, "Form Designer", "Containers", "Tab Container", "Empty Tab"),
    new StoryData_1.StoryNode(() => {
        let ui = getUI();
        ui.container.add(new TextFormControl_1.TextFormControl());
        ui.container.add(new TextFormControl_1.TextFormControl());
        ui.container.add(new TextFormControl_1.TextFormControl());
        return (0, jsx_runtime_1.jsx)(FormRuntime_1.FormRuntime, { form: ui.form });
    }, "Form Designer", "Containers", "Tab Container", "Control Tab Container"),
    new StoryData_1.StoryNode(() => {
        let ui = getUI();
        ui.container.selectedValue = "test2";
        ui.container.add(new TextFormControl_1.TextFormControl());
        ui.container.add(new TextFormControl_1.TextFormControl());
        ui.container.add(new TextFormControl_1.TextFormControl());
        return (0, jsx_runtime_1.jsx)(FormRuntime_1.FormRuntime, { form: ui.form });
    }, "Form Designer", "Containers", "Tab Container", "Second Tab"),
    new StoryData_1.StoryNode(() => {
        let ui = getUI();
        ui.container.orientation = FormDesignConstants_1.TabOrientation.Veritical;
        ui.container.add(new TextFormControl_1.TextFormControl());
        ui.container.add(new TextFormControl_1.TextFormControl());
        ui.container.add(new TextFormControl_1.TextFormControl());
        return (0, jsx_runtime_1.jsx)(FormRuntime_1.FormRuntime, { form: ui.form });
    }, "Form Designer", "Containers", "Tab Container", "Vertical"),
    new StoryData_1.StoryNode(() => {
        let ui = getUI();
        ui.container.fullWidth = true;
        ui.container.add(new TextFormControl_1.TextFormControl());
        ui.container.add(new TextFormControl_1.TextFormControl());
        ui.container.add(new TextFormControl_1.TextFormControl());
        return (0, jsx_runtime_1.jsx)(FormRuntime_1.FormRuntime, { form: ui.form });
    }, "Form Designer", "Containers", "Tab Container", "Full Width"),
    new StoryData_1.StoryNode(() => {
        let ui = getUI();
        ui.container.centered = true;
        ui.container.add(new TextFormControl_1.TextFormControl());
        ui.container.add(new TextFormControl_1.TextFormControl());
        ui.container.add(new TextFormControl_1.TextFormControl());
        return (0, jsx_runtime_1.jsx)(FormRuntime_1.FormRuntime, { form: ui.form });
    }, "Form Designer", "Containers", "Tab Container", "Centered"),
    new StoryData_1.StoryNode(() => {
        let ui = getUI();
        ui.container.containerBorderColor = "red";
        ui.container.containerBorderRadius = 50;
        ui.container.containerBorderStyle = FormDesignConstants_1.BorderStyle.Dashed;
        ui.container.containerBorderWidth = 10;
        return (0, jsx_runtime_1.jsx)(FormRuntime_1.FormRuntime, { form: ui.form });
    }, "Form Designer", "Containers", "Tab Container", "Override Border"),
    new StoryData_1.StoryNode(() => {
        let ui = getUI();
        ui.container.interControlSpacing = 30;
        ui.container.innerMargin = 30;
        ui.container.add(new TextFormControl_1.TextFormControl());
        ui.container.add(new TextFormControl_1.TextFormControl());
        ui.container.add(new TextFormControl_1.TextFormControl());
        return (0, jsx_runtime_1.jsx)(FormRuntime_1.FormRuntime, { form: ui.form });
    }, "Form Designer", "Containers", "Tab Container", "Override Spacing"),
    new StoryData_1.StoryNode(() => {
        let ui = getUI();
        ui.container.innerMarginTabHeader = 30;
        ui.container.add(new TextFormControl_1.TextFormControl());
        ui.container.add(new TextFormControl_1.TextFormControl());
        ui.container.add(new TextFormControl_1.TextFormControl());
        return (0, jsx_runtime_1.jsx)(FormRuntime_1.FormRuntime, { form: ui.form });
    }, "Form Designer", "Containers", "Tab Container", "Header Margin"),
    new StoryData_1.StoryNode(() => {
        let ui = getUI();
        ui.container.defaultTabContentBackground = "gray";
        return (0, jsx_runtime_1.jsx)(FormRuntime_1.FormRuntime, { form: ui.form });
    }, "Form Designer", "Containers", "Tab Container", "Default Content Background"),
    new StoryData_1.StoryNode(() => {
        let ui = getUI();
        ui.container.defaultShowContentBorder = true;
        return (0, jsx_runtime_1.jsx)(FormRuntime_1.FormRuntime, { form: ui.form });
    }, "Form Designer", "Containers", "Tab Container", "Default Content Border"),
    new StoryData_1.StoryNode(() => {
        let ui = getUI();
        ui.container.defaultShowContentBorder = true;
        ui.container.tabs[0].content.overrideFormBorderSettings = DefaultOnOff_1.DefaultOnOff.On;
        ui.container.tabs[0].content.contentBorderWidth = 2;
        ui.container.tabs[0].content.contentBorderColor = "red";
        return (0, jsx_runtime_1.jsx)(FormRuntime_1.FormRuntime, { form: ui.form });
    }, "Form Designer", "Containers", "Tab Container", "Override Content Border"),
    new StoryData_1.StoryNode(() => {
        let ui = getUI();
        ui.container.defaultShowContentBorder = true;
        ui.container.tabs[0].content.innerMargin = 30;
        return (0, jsx_runtime_1.jsx)(FormRuntime_1.FormRuntime, { form: ui.form });
    }, "Form Designer", "Containers", "Tab Container", "Override Content Inner Border"),
    new StoryData_1.StoryNode(() => {
        let ui = getUI();
        ui.container.defaultTabContentBackground = "gray";
        ui.container.tabs[0].content.contentBackgroundColor = "lightgray";
        return (0, jsx_runtime_1.jsx)(FormRuntime_1.FormRuntime, { form: ui.form });
    }, "Form Designer", "Containers", "Tab Container", "Override Content Background"),
];
//# sourceMappingURL=XTabContainer-stories.js.map