'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _style = require('styled-jsx/style.js');

var _style2 = _interopRequireDefault(_style);

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _classnames = require('classnames');

var _classnames2 = _interopRequireDefault(_classnames);

var _responsive = require('@vx/responsive');

var _page = require('../components/page');

var _page2 = _interopRequireDefault(_page);

var _footer = require('../components/footer');

var _footer2 = _interopRequireDefault(_footer);

var _bars = require('../components/tiles/bars');

var _bars2 = _interopRequireDefault(_bars);

var _Codeblock = require('../components/codeblocks/Codeblock');

var _Codeblock2 = _interopRequireDefault(_Codeblock);

var _gallery = require('../components/gallery');

var _gallery2 = _interopRequireDefault(_gallery);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var _jsxFileName = '/Users/hshoff/Code/vx/packages/vx-demo/components/show.js';
exports.default = (0, _responsive.withScreenSize)(function (_ref) {
  var screenWidth = _ref.screenWidth,
      screenHeight = _ref.screenHeight,
      children = _ref.children,
      title = _ref.title,
      component = _ref.component,
      _ref$shadow = _ref.shadow,
      shadow = _ref$shadow === undefined ? false : _ref$shadow,
      _ref$events = _ref.events,
      events = _ref$events === undefined ? false : _ref$events,
      _ref$margin = _ref.margin,
      margin = _ref$margin === undefined ? { top: 0, left: 0, right: 0, bottom: 80 } : _ref$margin;

  var padding = 40;
  var height = screenHeight * .6;
  var width = screenWidth - padding;
  if (width > 800) width = 800;

  return _react2.default.createElement(_page2.default, { title: title, __source: {
      fileName: _jsxFileName,
      lineNumber: 26
    }
  }, _react2.default.createElement('div', { className: 'container', 'data-jsx': 1332875523,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 27
    }
  }, _react2.default.createElement('div', { style: { width: width }, 'data-jsx': 1332875523,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 28
    }
  }, _react2.default.createElement('h1', {
    'data-jsx': 1332875523,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 29
    }
  }, title)), _react2.default.createElement('div', { className: (0, _classnames2.default)({
      'shadow': !!shadow
    }, title.split(' ').join('-'), 'chart'), 'data-jsx': 1332875523,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 31
    }
  }, component({ width: width, height: height, margin: margin, events: events })), _react2.default.createElement('div', { style: { width: width }, 'data-jsx': 1332875523,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 37
    }
  }, _react2.default.createElement('h2', {
    'data-jsx': 1332875523,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 38
    }
  }, 'Code')), _react2.default.createElement('div', { className: 'code', style: { width: width }, 'data-jsx': 1332875523,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 40
    }
  }, _react2.default.createElement(_Codeblock2.default, {
    __source: {
      fileName: _jsxFileName,
      lineNumber: 41
    }
  }, children))), _react2.default.createElement('div', { style: { marginTop: '40px' }, 'data-jsx': 1332875523,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 46
    }
  }, _react2.default.createElement(_gallery2.default, {
    __source: {
      fileName: _jsxFileName,
      lineNumber: 47
    }
  })), _react2.default.createElement(_style2.default, {
    styleId: 1332875523,
    css: '.container[data-jsx="1332875523"] {display:-webkit-flex; display:flex;-webkit-flex-direction: column;-moz-flex-direction: column;flex-direction: column;align-items: center;}.container[data-jsx="1332875523"] h1[data-jsx="1332875523"] {margin-top: 15px;line-height: .9em;letter-spacing: -.03em;}.container[data-jsx="1332875523"] h2[data-jsx="1332875523"] {margin-top: 15px;margin-bottom: 5px;}.chart[data-jsx="1332875523"] {overflow: hidden;border-radius: 14px;}.shadow[data-jsx="1332875523"] {border-radius: 14px;box-shadow: 0 1px 6px rgba(0,0,0,0.1);}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbXBvbmVudHMvc2hvdy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnRGtCLEFBQ0UsbUNBQ0ksbUNBQ1Msa0ZBQ0gsb0JBQ3JCLENBQ2MsNkRBQ0ksaU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RpcmVjdGlvbjogY29sdW1uO1xuICAgICAgICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7XG4gICAgICAgIH1cbiAgICAgICAgLmNvbnRhaW5lciBoMSB7XG4gICAgICAgICAgbWFyZ2luLXRvcDogMTVweDtcbiAgICAgICAgICBsaW5lLWhlaWdodDogLjllbTtcbiAgICAgICAgICBsZXR0ZXItc3BhY2luZzogLS4wM2VtO1xuICAgICAgICB9XG4gICAgICAgIC5jb250YWluZXIgaDIge1xuICAgICAgICAgIG1hcmdpbi10b3A6IDE1cHg7XG4gICAgICAgICAgbWFyZ2luLWJvdHRvbTogNXB4O1xuICAgICAgICB9XG4gICAgICAgIC5jaGFydCB7XG4gICAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjtcbiAgICAgICAgICBib3JkZXItcmFkaXVzOiAxNHB4O1xuICAgICAgICB9XG4gICAgICAgIC5zaGFkb3cge1xuICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDE0cHg7XG4gICAgICAgICAgYm94LXNoYWRvdzogMCAxcHggNnB4IHJnYmEoMCwwLDAsMC4xKTtcbiAgICAgICAgfVxuICAgICAgYH08L3N0eWxlPlxuICAgIDwvUGFnZT5cbiAgKTtcbn0pO1xuIl19 */\n/*@ sourceURL=components/show.js */'
  }));
});