import './_commonjsHelpers-0c4b6f40.js';
import './_to-object-cedb5b78.js';
import './es6.string.iterator-1577cb76.js';
import './_library-528f1934.js';
import './_iter-detect-0fa1c752.js';
import './core.get-iterator-method-227107e6.js';
import './_object-pie-33c40e79.js';
import './extends-be71a29a.js';
import './define-property-2f35af22.js';
import './web.dom.iterable-ace8ed30.js';
import React__default, { useRef, useEffect } from 'react';
import './events-6c3a7a63.js';
import './index-41a678ea.js';
import 'prop-types';
import Row$1 from 'react-bootstrap/Row';
import Col$1 from 'react-bootstrap/Col';
import './isSymbol-1981418f.js';
import './debounce-89969f66.js';
import './toNumber-e3dcad26.js';
import { m as main_43 } from './main-ae902629.js';
import './slicedToArray-f0edf3d6.js';
import './stringify-d1b9276a.js';
import './asyncToGenerator-e1a2f43a.js';
import './Segment.js';
import './Beam.js';
import './AdSlot.js';
import './get-1e515072.js';
import './eq-b470f743.js';
import './react-social-icons-a7d5c5c7.js';
import 'react-bootstrap';
import './defineProperty-eb9699c0.js';
import SideFooter from './SideFooter.js';
import { C as ConferenceBanner } from './ConferenceBanner-8792ebd2.js';
import ADSponsoredResources from './ADSponsoredResources.js';
import 'react-bootstrap/ListGroup';
import './ADWebcast.js';
import LeftNav from './LeftNav.js';
import PageFilter from './PageFilter.js';

var Column3 = function Column3(props) {
  var leftItems = props.leftItems,
      rightItems = props.rightItems,
      title = props.title,
      website = props.website,
      showFilter = props.showFilter,
      getParams = props.getParams,
      filters = props.filters,
      defaultFilter = props.defaultFilter,
      showRightAd = props.showRightAd,
      logo = props.logo;

  var adRef = useRef(null);

  useEffect(function () {
    if (!main_43 && window.innerWidth >= 768) {
      var navbar = document.querySelector('.navbar');
      var AdOffsetTop = adRef.current.getBoundingClientRect().top;
      window.addEventListener('scroll', function () {
        if (window.pageYOffset + (AdOffsetTop - navbar.offsetHeight) > AdOffsetTop) {
          if (adRef.current && adRef.current.style) {
            adRef.current.style.position = 'fixed';
            adRef.current.style.top = '60px';
          }
        } else {
          if (adRef.current && adRef.current.style) {
            adRef.current.style.position = 'relative';
            adRef.current.style.top = '';
          }
        }
      });
    }
  }, []);

  return React__default.createElement(
    'section',
    null,
    React__default.createElement(
      Row$1,
      { className: 'justify-content-md-center' },
      React__default.createElement(
        Col$1,
        { md: true, className: 'leftCol', style: { width: '200px' } },
        React__default.createElement(LeftNav, { leftItems: leftItems }),
        website && website.sponsoredAd && React__default.createElement(ADSponsoredResources, { sponsoredAd: website.sponsoredAd }),
        website && website.sideFooterContent && website.sideFooterContent.length && website.showFooterOnLeftSide && React__default.createElement(SideFooter, { website: website, cache: website.cache, logo: logo })
      ),
      React__default.createElement(
        Col$1,
        { md: true, className: 'middleCol', style: { maxWidth: '640px', marginTop: !title && '10px' } },
        showFilter ? React__default.createElement(
          'div',
          { className: 'title-wrap' },
          React__default.createElement(
            'h1',
            { className: 'title' },
            title
          ),
          React__default.createElement(
            'div',
            { className: 'filter-box' },
            React__default.createElement(PageFilter, { getParams: getParams, filters: filters, defaultFilter: defaultFilter })
          )
        ) : title && React__default.createElement(
          'h1',
          { className: 'title' },
          title
        ),
        props.children
      ),
      React__default.createElement(
        'style',
        { jsx: 'true' },
        '\n            .filter-box {\n              float: right;\n              padding-top: 6px;\n              padding-right: 18px;\n            }\n            @media only screen and (min-width: 768px) {\n              .title-wrap {\n                display: flex;\n                justify-content: space-between;\n              }\n            }\n            @media only screen and (max-width: 767px) {\n              /* .filter-box {\n                float: right;\n                display: flex;\n                justify-content: flex-end;\n              } */\n              .title-wrap {\n                display: flex;\n                flex-direction: column;\n                margin-bottom: 10px;\n              }\n            }\n          '
      ),
      (!main_43 || showRightAd) && React__default.createElement(
        Col$1,
        { xs: 12, className: 'rightCol' },
        website && website.conferenceBannerContent && React__default.createElement(ConferenceBanner, { website: website }),
        React__default.createElement(
          'div',
          { ref: adRef },
          rightItems && rightItems.map(function (row, index) {
            return React__default.createElement(
              'div',
              { key: index },
              row.component
            );
          }),
          website && website.sideFooterContent && website.sideFooterContent.length && !website.showFooterOnLeftSide && React__default.createElement(SideFooter, { website: website, cache: website.cache, logo: logo })
        )
      )
    )
  );
};

export default Column3;
export { Column3 };
