function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

import React, { useEffect } from 'react';
import { Section } from '@looker/components';
import { useWindowSize } from '../../utils';
import { HEADER_REM } from '../Header';
export var REM_TO_PX = 16;
export var ApixSection = props => {
  var size = useWindowSize();
  var sectionH = size.height - REM_TO_PX * HEADER_REM;
  useEffect(() => {
    var _document$getElementB;

    (_document$getElementB = document.getElementById('top')) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.scrollTo(REM_TO_PX * HEADER_REM, 0);
  }, [props]);
  return React.createElement(Section, _extends({}, props, {
    id: "top",
    p: "xxlarge",
    style: {
      height: "".concat(sectionH, "px"),
      overflow: 'auto',
      borderTop: '0px'
    }
  }));
};
//# sourceMappingURL=common.js.map