'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 * 0.6;
  var width = screenWidth - padding;
  if (width > 800) width = 800;

  return _react2.default.createElement(_page2.default, { title: title, __source: {
      fileName: _jsxFileName,
      lineNumber: 27
    }
  }, _react2.default.createElement('div', { className: 'container', 'data-jsx': 152677678,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 28
    }
  }, _react2.default.createElement('div', { style: { width: width }, 'data-jsx': 152677678,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 29
    }
  }, _react2.default.createElement('h1', {
    'data-jsx': 152677678,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 30
    }
  }, title)), _react2.default.createElement('div', {
    className: (0, _classnames2.default)({
      shadow: !!shadow
    }, title.split(' ').join('-'), 'chart'),
    'data-jsx': 152677678,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 32
    }
  }, _react2.default.createElement(component, {
    width: width,
    height: height,
    margin: margin,
    events: events
  })), _react2.default.createElement('div', { style: { width: width }, 'data-jsx': 152677678,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 48
    }
  }, _react2.default.createElement('h2', {
    'data-jsx': 152677678,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 49
    }
  }, 'Code')), _react2.default.createElement('div', { className: 'code', style: { width: width }, 'data-jsx': 152677678,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 51
    }
  }, _react2.default.createElement(_Codeblock2.default, {
    __source: {
      fileName: _jsxFileName,
      lineNumber: 52
    }
  }, children))), _react2.default.createElement('div', { style: { marginTop: '40px' }, 'data-jsx': 152677678,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 55
    }
  }, _react2.default.createElement(_gallery2.default, {
    __source: {
      fileName: _jsxFileName,
      lineNumber: 56
    }
  })), _react2.default.createElement(_style2.default, {
    styleId: 152677678,
    css: '.container[data-jsx="152677678"]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.container[data-jsx="152677678"] h1[data-jsx="152677678"]{margin-top:15px;line-height:0.9em;-webkit-letter-spacing:-.03em;-moz-letter-spacing:-.03em;-ms-letter-spacing:-.03em;letter-spacing:-.03em}.container[data-jsx="152677678"] h2[data-jsx="152677678"]{margin-top:15px;margin-bottom:5px}.chart[data-jsx="152677678"]{border-radius:14px}.shadow[data-jsx="152677678"]{border-radius:14px;box-shadow:0 1px 6px rgba(0,0,0,0.1)}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbXBvbmVudHMvc2hvdy5qcyJdLCJuYW1lcyI6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QwO1xuICAgIGNvbnN0IGhlaWdodCA9IHNjcmVlbkhlaWdodCAqIDAuNjtcbiAgICBsZXQgd2lkdGggPSBzY3JlZW5XaWR0aCAtIHBhZGRpbmc7XG4gICAgaWYgKHdpZHRoID4gODAwKSB3aWR0aCA9IDgwMDtcblxuICAgIHJldHVybiAoXG4gICAgICA8UGFnZSB0aXRsZT17dGl0bGV9PlxuICAgICAgICA8ZGl2IGNsYXNzTmFtZT1cImNvbnRhaW5lclwiPlxuICAgICAgICAgIDxkaXYgc3R5bGU9e3sgd2lkdGg6IHdpZHRoIH19PlxuICAgICAgICAgICAgPGgxPnt0aXRsZX08L2gxPlxuICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgIGNsYXNzTmFtZT17Y3goXG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBzaGFkb3c6ICEhc2hhZG93LFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICB0aXRsZS5zcGxpdCgnICcpLmpvaW4oJy0nKSxcbiAgICAgICAgICAgICAgJ2NoYXJ0JyxcbiAgICAgICAgICAgICl9XG4gICAgICAgICAgPlxuICAgICAgICAgICAge1JlYWN0LmNyZWF0ZUVsZW1lbnQoY29tcG9uZW50LCB7XG4gICAgICAgICAgICAgIHdpZHRoLFxuICAgICAgICAgICAgICBoZWlnaHQsXG4gICAgICAgICAgICAgIG1hcmdpbixcbiAgICAgICAgICAgICAgZXZlbnRzLFxuICAgICAgICAgICAgfSl9XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgPGRpdiBzdHlsZT17eyB3aWR0aDogd2lkdGggfX0+XG4gICAgICAgICAgICA8aDI+Q29kZTwvaDI+XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgPGRpdiBjbGFzc05hbWU9XCJjb2RlXCIgc3R5bGU9e3sgd2lkdGg6IHdpZHRoIH19PlxuICAgICAgICAgICAgPENvZGVibG9jaz57Y2hpbGRyZW59PC9Db2RlYmxvY2s+XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgIDwvZGl2PlxuICAgICAgICA8ZGl2IHN0eWxlPXt7IG1hcmdpblRvcDogJzQwcHgnIH19PlxuICAgICAgICAgIDxHYWxsZXJ5IC8+XG4gICAgICAgIDwvZGl2PlxuICAgICAgICA8c3R5bGUganN4PntgXG4gICAgICAgICAgLmNvbnRhaW5lciB7XG4gICAgICAgICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgICAgICAgZmxleC1kaXJlY3Rpb246IGNvbHVtbjtcbiAgICAgICAgICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7XG4gICAgICAgICAgfVxuICAgICAgICAgIC5jb250YWluZXIgaDEge1xuICAgICAgICAgICAgbWFyZ2luLXRvcDogMTVweDtcbiAgICAgICAgICAgIGxpbmUtaGVpZ2h0OiAwLjllbTtcbiAgICAgICAgICAgIGxldHRlci1zcGFjaW5nOiAtLjAzZW07XG4gICAgICAgICAgfVxuICAgICAgICAgIC5jb250YWluZXIgaDIge1xuICAgICAgICAgICAgbWFyZ2luLXRvcDogMTVweDtcbiAgICAgICAgICAgIG1hcmdpbi1ib3R0b206IDVweDtcbiAgICAgICAgICB9XG4gICAgICAgICAgLmNoYXJ0IHtcbiAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDE0cHg7XG4gICAgICAgICAgfVxuICAgICAgICAgIC5zaGFkb3cge1xuICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogMTRweDtcbiAgICAgICAgICAgIGJveC1zaGFkb3c6IDAgMXB4IDZweCByZ2JhKDAsIDAsIDAsIDAuMSk7XG4gICAgICAgICAgfVxuICAgICAgICBgfTwvc3R5bGU+XG4gICAgICA8L1BhZ2U+XG4gICAgKTtcbiAgfSxcbik7XG4iXX0= */\n/*@ sourceURL=components/show.js */'
  }));
});