import r from"@babel/runtime/helpers/slicedToArray";import{useState as e}from"react";import o from"prop-types";import{withStyles as p,Popover as i}from"@material-ui/core";import s from"./UserCard/index.js";import{jsxs as a,Fragment as t,jsx as n}from"react/jsx-runtime";function l(o){var p=e(null),l=r(p,2),c=l[0],u=l[1],d=Boolean(c);return a(t,{children:[n("div",{"aria-owns":d?"user-popover":void 0,"aria-haspopup":"true",onClick:function(r){u(r.currentTarget)},className:o.classes.childrenWrapper,style:o.wrapperStyle,children:o.children}),n(i,{id:"user-popover",open:d,classes:{paper:o.classes.popoverPaper},anchorEl:c,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:function(){u(null)},children:n(s,{user:o.user,currentUser:o.currentUser})})]})}l.propTypes={wrapperStyle:o.shape({}),user:o.shape({}).isRequired,children:o.node.isRequired,currentUser:o.shape({}),classes:o.shape({popoverPaper:o.string.isRequired,childrenWrapper:o.string.isRequired}).isRequired},l.defaultProps={wrapperStyle:{},currentUser:{}};var c=p({popoverPaper:{background:"transparent"},childrenWrapper:{cursor:"pointer"}})(l);export{c as default};
