"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault"),_react=_interopRequireDefault(require("react")),_react2=require("@storybook/react"),_addonInfo=require("@storybook/addon-info"),_addonActions=require("@storybook/addon-actions"),_formik=require("formik"),_FormikDropdown=_interopRequireDefault(require("./FormikDropdown")),_index=_interopRequireDefault(require("./index"));(0,_react2.storiesOf)("Dropdown",module).add("Default",(0,_addonInfo.withInfo)("Default")(function(){return/*#__PURE__*/_react["default"].createElement("div",{style:{margin:10}},/*#__PURE__*/_react["default"].createElement("h4",null,"Default"),/*#__PURE__*/_react["default"].createElement(_index["default"],{label:"Gender",items:[{label:"Male",value:"male"},{label:"Female",value:"female"}]}),/*#__PURE__*/_react["default"].createElement("h4",null,"Selected"),/*#__PURE__*/_react["default"].createElement(_index["default"],{selectedIndex:0,items:[{label:"Male",value:"male"},{label:"Female",value:"female"}]}),/*#__PURE__*/_react["default"].createElement("h4",null,"Multiple Selection"),/*#__PURE__*/_react["default"].createElement(_index["default"],{multiple:!0,items:[{label:"First",value:"First"},{label:"Second",value:"Second"},{label:"Third",value:"Third"},{label:"Fourth",value:"Fourth"},{label:"Fifth",value:"Fifth"}]}),/*#__PURE__*/_react["default"].createElement("h4",null,"Multiple initial Selection using index"),/*#__PURE__*/_react["default"].createElement(_index["default"],{multiple:!0,selectedIndex:[0,2],items:[{label:"First",value:"First"},{label:"Second",value:"Second"},{label:"Third",value:"Third"},{label:"Fourth",value:"Fourth"},{label:"Fifth",value:"Fifth"}]}),/*#__PURE__*/_react["default"].createElement("h4",null,"Multiple initial Selection using value"),/*#__PURE__*/_react["default"].createElement(_index["default"],{multiple:!0,value:["First","Third"],items:[{label:"First",value:"First"},{label:"Second",value:"Second"},{label:"Third",value:"Third"},{label:"Fourth",value:"Fourth"},{label:"Fifth",value:"Fifth"}]}),/*#__PURE__*/_react["default"].createElement("h4",null,"Custom Placeholder & without Label"),/*#__PURE__*/_react["default"].createElement(_index["default"],{placeholder:"Select Gender",items:[{label:"Male",value:"male"},{label:"Female",value:"female"}]}),/*#__PURE__*/_react["default"].createElement("h4",null,"onChange function"),/*#__PURE__*/_react["default"].createElement(_index["default"],{placeholder:"Select Gender",onChange:(0,_addonActions.action)("on-change"),items:[{label:"Male",value:"male"},{label:"Female",value:"female"}]}),/*#__PURE__*/_react["default"].createElement("h4",null,"Disabled"),/*#__PURE__*/_react["default"].createElement(_index["default"],{placeholder:"Select Gender",disabled:!0,selectedIndex:0,items:[{label:"Male",value:"male"},{label:"Female",value:"female"}]}),/*#__PURE__*/_react["default"].createElement("h4",null,"With Error"),/*#__PURE__*/_react["default"].createElement(_index["default"],{placeholder:"Select Gender",disabled:!0,items:[{label:"Male",value:"male"},{label:"Female",value:"female"}],error:"Please select your gender"}))})).add("Formik",(0,_addonInfo.withInfo)("Formik Dropdown")(function(){return/*#__PURE__*/_react["default"].createElement("div",{style:{margin:10}},/*#__PURE__*/_react["default"].createElement(_formik.Formik,{initialValues:{singleSelection:"",multiSelection:[],preSelected:["First","Second"]},onSubmit:function onSubmit(){}},/*#__PURE__*/_react["default"].createElement(_react["default"].Fragment,null,/*#__PURE__*/_react["default"].createElement(_FormikDropdown["default"],{name:"singleSelection",label:"Gender",items:[{label:"Male",value:"male"},{label:"Female",value:"female"}]}),/*#__PURE__*/_react["default"].createElement("br",null),/*#__PURE__*/_react["default"].createElement(_FormikDropdown["default"],{name:"multiSelection",label:"Multiple Selection",multiple:!0,items:[{label:"First",value:"First"},{label:"Second",value:"Second"},{label:"Third",value:"Third"},{label:"Fourth",value:"Fourth"},{label:"Fifth",value:"Fifth"}]}),/*#__PURE__*/_react["default"].createElement("br",null),/*#__PURE__*/_react["default"].createElement(_FormikDropdown["default"],{name:"preSelected",label:"Pre Selected",multiple:!0,items:[{label:"First",value:"First"},{label:"Second",value:"Second"},{label:"Third",value:"Third"},{label:"Fourth",value:"Fourth"},{label:"Fifth",value:"Fifth"}]}))))}));