'use strict';

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

var _propTypes = require('prop-types');

var _propTypes2 = _interopRequireDefault(_propTypes);

var _styledComponents = require('styled-components');

var _styledComponents2 = _interopRequireDefault(_styledComponents);

var _themeGet = require('../../extensions/themeGet');

var _themeGet2 = _interopRequireDefault(_themeGet);

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

var SidebarLayout = _styledComponents2.default.div.withConfig({ displayName: 'SidebarLayout' }).withConfig({
  displayName: 'SidebarLayout'
})(['display:flex;flex-direction:row;align-items:stretch;margin:0;padding:0;& > *:', '{flex:3;}& > *:', '{flex:6;background:', ';border-', '-width:', ';border-', '-style:solid;border-', '-color:', ';margin-', ':-1px;}'], function (props) {
  return props.right ? 'last-child' : 'first-child';
}, function (props) {
  return props.right ? 'first-child' : 'last-child';
}, (0, _themeGet2.default)('colors.gray.light'), function (props) {
  return props.right ? 'right' : 'left';
}, (0, _themeGet2.default)('thicknesses.normal'), function (props) {
  return props.right ? 'right' : 'left';
}, function (props) {
  return props.right ? 'right' : 'left';
}, (0, _themeGet2.default)('colors.border.light'), function (props) {
  return props.right ? 'right' : 'left';
});

SidebarLayout.propTypes = {
  /**
   * Adds an id to the element.
   */
  id: _propTypes2.default.string,
  /**
   * Adds a class name to the element.
   */
  className: _propTypes2.default.string,
  /**
   * Sidebar is put on the right side instead of left.
   */
  right: _propTypes2.default.bool
};

SidebarLayout.defaultProps = {
  id: null,
  className: null,
  right: false
};

/**
 * @component
 */
exports.default = SidebarLayout;