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