"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.default = exports.Basic = void 0;
var _react = _interopRequireDefault(require("react"));
var _Box = _interopRequireDefault(require("../Box"));
var _Button = _interopRequireDefault(require("../Button"));
var _Popover = _interopRequireDefault(require("./Popover"));
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/Popover/Popover.story.tsx";
var _default = exports.default = {
  title: 'Popover',
  component: _Popover.default
};
var ControlledPopover = () => {
  var [isOpen, setIsOpen] = _react.default.useState(false);
  var toggle = () => setIsOpen(!isOpen);
  return /*#__PURE__*/_react.default.createElement(_Popover.default, {
    shown: isOpen,
    onClickOutside: toggle,
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 19,
      columnNumber: 5
    }
  }, /*#__PURE__*/_react.default.createElement(_Popover.default.Element, {
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 20,
      columnNumber: 7
    }
  }, /*#__PURE__*/_react.default.createElement(_Button.default, {
    onClick: toggle,
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 21,
      columnNumber: 9
    }
  }, "Element")), /*#__PURE__*/_react.default.createElement(_Popover.default.Content, {
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 23,
      columnNumber: 7
    }
  }, /*#__PURE__*/_react.default.createElement(_Box.default, {
    padding: "10px",
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 24,
      columnNumber: 9
    }
  }, "Content")));
};
var Template = () => /*#__PURE__*/_react.default.createElement(ControlledPopover, {
  __self: void 0,
  __source: {
    fileName: _jsxFileName,
    lineNumber: 30,
    columnNumber: 56
  }
});
var Basic = exports.Basic = Template.bind({});
Basic.args = {};
//# sourceMappingURL=Popover.story.js.map