var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _components=require("@bluebase/components");var _react=_interopRequireDefault(require("react"));var _core=require("@bluebase/core");var _storybookAddon=_interopRequireDefault(require("@bluebase/storybook-addon"));var _addonInfo=require("@storybook/addon-info");var _addonKnobs=require("@storybook/addon-knobs");var _jsxFileName="/home/travis/build/BlueBaseJS/plugin-material-ui/src/components/Menu/_stories_/Menu.stories.tsx";var MenuItem=(0,_core.getComponent)('MenuItem');var Menu=(0,_core.getComponent)('Menu');var Button=(0,_core.getComponent)('Button');var stories=(0,_storybookAddon.default)('Menu',module);stories.addDecorator(_addonInfo.withInfo);stories.addDecorator(_addonKnobs.withKnobs);stories.add('Menu complete story',function(){return _react.default.createElement(_react.default.Fragment,{__source:{fileName:_jsxFileName,lineNumber:20}},_react.default.createElement(SimpleMenu,{__source:{fileName:_jsxFileName,lineNumber:21}}));}).add('Menu text story',function(){return _react.default.createElement(_react.default.Fragment,{__source:{fileName:_jsxFileName,lineNumber:27}},_react.default.createElement(MenuText,{__source:{fileName:_jsxFileName,lineNumber:28}}));});function SimpleMenu(){var _React$useState=_react.default.useState(null),_React$useState2=(0,_slicedToArray2.default)(_React$useState,2),anchorEl=_React$useState2[0],setAnchorEl=_React$useState2[1];function handleClick(event){setAnchorEl(event.currentTarget);}function handleClose(){setAnchorEl(null);}return _react.default.createElement("div",{__source:{fileName:_jsxFileName,lineNumber:48}},_react.default.createElement(Button,{"aria-owns":anchorEl?'simple-menu':undefined,"aria-haspopup":"true",onClick:handleClick,__source:{fileName:_jsxFileName,lineNumber:49}},"Open Menu"),_react.default.createElement(Menu,{style:{},anchor:anchorEl,visible:Boolean(anchorEl),onDismiss:handleClose,__source:{fileName:_jsxFileName,lineNumber:56}},_react.default.createElement(MenuItem,{title:'Profile',onPress:handleClose,__source:{fileName:_jsxFileName,lineNumber:57}}),_react.default.createElement(MenuItem,{title:'My account',onPress:handleClose,__source:{fileName:_jsxFileName,lineNumber:58}}),_react.default.createElement(MenuItem,{title:'Logout',onPress:handleClose,__source:{fileName:_jsxFileName,lineNumber:59}})));}function MenuText(){var _React$useState3=_react.default.useState(null),_React$useState4=(0,_slicedToArray2.default)(_React$useState3,2),anchorEl=_React$useState4[0],setAnchorEl=_React$useState4[1];function handleClick(event){setAnchorEl(event.currentTarget);}function handleClose(){setAnchorEl(null);}return _react.default.createElement("div",{__source:{fileName:_jsxFileName,lineNumber:82}},_react.default.createElement(Button,{"aria-owns":anchorEl?'simple-menu':undefined,"aria-haspopup":"true",onClick:handleClick,__source:{fileName:_jsxFileName,lineNumber:83}},"Open Menu"),_react.default.createElement(Menu,{style:{},anchor:anchorEl,visible:Boolean(anchorEl),onDismiss:handleClose,__source:{fileName:_jsxFileName,lineNumber:90}},_react.default.createElement(MenuItem,{title:_react.default.createElement(_components.Text,{__source:{fileName:_jsxFileName,lineNumber:91}},"profile"),onPress:handleClose,__source:{fileName:_jsxFileName,lineNumber:91}}),_react.default.createElement(MenuItem,{title:_react.default.createElement(_components.Text,{__source:{fileName:_jsxFileName,lineNumber:92}},"my Account"),onPress:handleClose,__source:{fileName:_jsxFileName,lineNumber:92}}),_react.default.createElement(MenuItem,{title:_react.default.createElement(_components.Text,{__source:{fileName:_jsxFileName,lineNumber:93}},"Logout"),onPress:handleClose,__source:{fileName:_jsxFileName,lineNumber:93}})));}var _default=SimpleMenu;exports.default=_default;