var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _components=require("@bluebase/components");var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");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="/__w/plugin-material-ui/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('Basic Example',function(){return _react.default.createElement(_react.default.Fragment,{__source:{fileName:_jsxFileName,lineNumber:20,columnNumber:2}},_react.default.createElement(MenuDemo,{__source:{fileName:_jsxFileName,lineNumber:21,columnNumber:3}}));});var MenuDemo=function MenuDemo(){var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),visible=_useState2[0],setVisible=_useState2[1];var toggle=function toggle(){return setVisible(!visible);};return _react.default.createElement(_reactNative.View,{style:{paddingTop:50},__source:{fileName:_jsxFileName,lineNumber:30,columnNumber:3}},_react.default.createElement(Menu,{visible:visible,onDismiss:toggle,anchor:_react.default.createElement(Button,{onPress:toggle,__source:{fileName:_jsxFileName,lineNumber:40,columnNumber:13}},"Show menu"),__source:{fileName:_jsxFileName,lineNumber:37,columnNumber:4}},_react.default.createElement(MenuItem,{onPress:toggle,title:"Item 1",__source:{fileName:_jsxFileName,lineNumber:42,columnNumber:5}}),_react.default.createElement(MenuItem,{onPress:toggle,title:"Item 2",__source:{fileName:_jsxFileName,lineNumber:43,columnNumber:5}}),_react.default.createElement(_components.Divider,{__source:{fileName:_jsxFileName,lineNumber:44,columnNumber:5}}),_react.default.createElement(MenuItem,{onPress:toggle,title:"Item 3",__source:{fileName:_jsxFileName,lineNumber:45,columnNumber:5}})));};