"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../ext-esm/tslib/tslib.es6.js'),r=require("react/jsx-runtime"),n=require("@material-ui/core"),o=require("react"),i=require("../../components/DevCenter/DevCenterAppContainer/components/IsInsideDcAppProvider/IsInsideDcAppProvider.js"),s=require("../../components/DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js"),t=require("./DcPopover.js");exports.Popover=function(c){var l=c.children,a=c.open,p=c.onClose,u=c.transformOrigin,d=void 0===u?{vertical:"top",horizontal:"left"}:u,v=c.className,m=e.__rest(c,["children","open","onClose","transformOrigin","className"]),h=i.useIsInsideDcApp(),D=s.useIsInsideDcFullscreenElem(),f=o.useMemo((function(){return{paper:v}}),[v]),C=o.useCallback((function(e,r){null==p||p(r,e)}),[p]),P=h&&!D?t.DcPopover:n.Popover,I="position"in m?{anchorReference:"anchorPosition",anchorPosition:m.position}:{anchorReference:"anchorEl",anchorEl:m.anchorEl,anchorOrigin:m.anchorOrigin||{vertical:"top",horizontal:"left"}};return r.jsx(P,e.__assign({open:a,transformOrigin:d,onClose:C,classes:f},I,{children:l}))};
