"use strict";
// The require scope
var __webpack_require__ = {};
/************************************************************************/ // webpack/runtime/compat_get_default_export
(()=>{
    // getDefaultExport function for compatibility with non-ESM modules
    __webpack_require__.n = function(module) {
        var getter = module && module.__esModule ? function() {
            return module['default'];
        } : function() {
            return module;
        };
        __webpack_require__.d(getter, {
            a: getter
        });
        return getter;
    };
})();
// webpack/runtime/define_property_getters
(()=>{
    __webpack_require__.d = function(exports1, definition) {
        for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
            enumerable: true,
            get: definition[key]
        });
    };
})();
// webpack/runtime/has_own_property
(()=>{
    __webpack_require__.o = function(obj, prop) {
        return Object.prototype.hasOwnProperty.call(obj, prop);
    };
})();
// webpack/runtime/make_namespace_object
(()=>{
    // define __esModule on exports
    __webpack_require__.r = function(exports1) {
        if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
            value: 'Module'
        });
        Object.defineProperty(exports1, '__esModule', {
            value: true
        });
    };
})();
/************************************************************************/ var __webpack_exports__ = {};
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
    FormFieldAsSwitch: ()=>/* binding */ FormFieldAsSwitch,
    Description: ()=>/* binding */ Description,
    default: ()=>/* binding */ FormField_stories_rslib_entry_,
    SelectExample: ()=>/* binding */ SelectExample,
    FooterDescription: ()=>/* binding */ FooterDescription,
    LabelAsReactElement: ()=>/* binding */ LabelAsReactElement,
    Invalid: ()=>/* binding */ Invalid,
    HelpText: ()=>/* binding */ HelpText,
    MultiInputSingleOutput: ()=>/* binding */ MultiInputSingleOutput,
    Required: ()=>/* binding */ Required,
    Default: ()=>/* binding */ Default
});
const react_namespaceObject = require("@chakra-ui/react");
const external_FormField_js_namespaceObject = require("./FormField.js");
var external_FormField_js_default = /*#__PURE__*/ __webpack_require__.n(external_FormField_js_namespaceObject);
const Select_js_namespaceObject = require("../Inputs/Select/Select.js");
var Select_js_default = /*#__PURE__*/ __webpack_require__.n(Select_js_namespaceObject);
const meta = {
    title: 'Components/FormField',
    component: external_FormField_js_default(),
    argTypes: {
        label: {
            control: {
                type: 'text'
            }
        },
        helpText: {
            control: {
                type: 'text'
            }
        },
        errorText: {
            control: {
                type: 'text'
            }
        },
        isInvalid: {
            control: {
                type: 'boolean'
            }
        }
    },
    parameters: {
        design: {
            type: 'figma',
            url: 'https://www.figma.com/file/bJcVrZNilxa06jYuVCGWYd/Redpanda-Design-System-2023?type=design&node-id=42-2782&mode=design'
        }
    }
};
/* ESM default export */ const FormField_stories_rslib_entry_ = meta;
const Default = {
    args: {
        label: 'Text input',
        helpText: '',
        errorText: '',
        isInvalid: false,
        children: /*#__PURE__*/ React.createElement(react_namespaceObject.Input, {
            "data-testid": "input",
            name: "text",
            type: "text",
            placeholder: "Enter text"
        })
    }
};
const LabelAsReactElement = {
    args: {
        label: /*#__PURE__*/ React.createElement(React.Fragment, null, "Text ", /*#__PURE__*/ React.createElement("em", null, "input"), " with ", /*#__PURE__*/ React.createElement(react_namespaceObject.Link, {
            href: "#"
        }, "link")),
        helpText: '',
        errorText: '',
        isInvalid: false,
        children: /*#__PURE__*/ React.createElement(react_namespaceObject.Input, {
            "data-testid": "input",
            name: "text",
            type: "text",
            placeholder: "Enter text"
        })
    }
};
const Required = {
    args: {
        label: 'Text input',
        isRequired: true,
        helpText: '',
        errorText: '',
        isInvalid: false,
        children: /*#__PURE__*/ React.createElement(react_namespaceObject.Input, {
            "data-testid": "input",
            name: "text",
            type: "text",
            placeholder: "Enter text"
        })
    }
};
const FormFieldAsSwitch = {
    args: {
        label: 'Switch input',
        isRequired: true,
        description: 'Description',
        helpText: 'Help text',
        tooltip: 'Tooltip',
        errorText: '',
        isInvalid: false,
        children: /*#__PURE__*/ React.createElement(react_namespaceObject.Switch, {
            "data-testid": "switch",
            defaultChecked: true
        })
    }
};
const HelpText = {
    args: {
        label: 'Text input',
        helpText: 'Help text',
        errorText: 'Text entered incorrectly',
        isInvalid: false,
        children: /*#__PURE__*/ React.createElement(react_namespaceObject.Input, {
            name: "text",
            type: "text",
            placeholder: "Enter text"
        }),
        description: /*#__PURE__*/ React.createElement(React.Fragment, null, "This is a field description, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore, labore et dolore. ", /*#__PURE__*/ React.createElement(react_namespaceObject.Link, null, "Learn more"))
    }
};
const Description = {
    args: {
        label: 'Text input',
        errorText: 'Text entered incorrectly',
        isInvalid: false,
        children: /*#__PURE__*/ React.createElement(react_namespaceObject.Input, {
            name: "text",
            type: "text",
            placeholder: "Enter text"
        }),
        description: /*#__PURE__*/ React.createElement(React.Fragment, null, "This is a field description, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore, labore et dolore. ", /*#__PURE__*/ React.createElement(react_namespaceObject.Link, null, "Learn more"))
    }
};
const FooterDescription = {
    args: {
        label: 'Text input',
        errorText: 'Text entered incorrectly',
        isInvalid: false,
        children: /*#__PURE__*/ React.createElement(react_namespaceObject.Input, {
            name: "text",
            type: "text",
            placeholder: "Enter text"
        }),
        description: /*#__PURE__*/ React.createElement(react_namespaceObject.Text, null, "Main description"),
        footerDescription: /*#__PURE__*/ React.createElement(react_namespaceObject.Text, null, "Footer description")
    }
};
const Invalid = {
    args: {
        label: 'Text input',
        helpText: 'Help text',
        errorText: 'Text entered incorrectly',
        isInvalid: true,
        children: /*#__PURE__*/ React.createElement(react_namespaceObject.Input, {
            name: "text",
            type: "text",
            placeholder: "Enter text"
        })
    }
};
const SelectExample = {
    args: {
        label: 'Select input',
        helpText: 'Help text',
        errorText: 'Red is an invalid option',
        isInvalid: false,
        children: /*#__PURE__*/ React.createElement(Select_js_default(), {
            name: "select",
            placeholder: "Choose an option",
            options: [
                {
                    value: 'red',
                    label: 'Red'
                },
                {
                    value: 'blue',
                    label: 'Blue'
                },
                {
                    value: 'green',
                    label: 'Green'
                },
                {
                    value: 'yellow',
                    label: 'Yellow'
                },
                {
                    value: 'orange',
                    label: 'Orange'
                }
            ]
        })
    }
};
const MultiInputSingleOutput = {
    args: {
        label: 'Multiple input with single output value',
        helpText: 'Help text',
        errorText: 'Red is an invalid option',
        isInvalid: false,
        children: /*#__PURE__*/ React.createElement(react_namespaceObject.HStack, {
            maxW: "400"
        }, /*#__PURE__*/ React.createElement(react_namespaceObject.Input, {
            "data-testid": "input-1",
            name: "text1",
            type: "text",
            placeholder: "Enter text 1"
        }), /*#__PURE__*/ React.createElement(react_namespaceObject.Input, {
            "data-testid": "input-2",
            name: "text2",
            type: "text",
            placeholder: "Enter text 2"
        }))
    }
};
var __webpack_export_target__ = exports;
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
    value: true
});
