'use strict';

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

var _templateObject = _taggedTemplateLiteral(['\n  font-size: 0.75em;\n\n  & > .FlowItem-label {\n    height: auto;\n    margin: 0;\n  }\n\n  & > ', ' {\n    height: 20px;\n  }\n\n  & > ', ' {\n    min-height: 20px;\n  }\n\n  & > .FlowItem-helpText {\n    min-height: 14px;\n    margin: 0;\n  }\n'], ['\n  font-size: 0.75em;\n\n  & > .FlowItem-label {\n    height: auto;\n    margin: 0;\n  }\n\n  & > ', ' {\n    height: 20px;\n  }\n\n  & > ', ' {\n    min-height: 20px;\n  }\n\n  & > .FlowItem-helpText {\n    min-height: 14px;\n    margin: 0;\n  }\n']);

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

var _styledComponents2 = _interopRequireDefault(_styledComponents);

var _FlowItemContent = require('./FlowItemContent');

var _FlowItemContent2 = _interopRequireDefault(_FlowItemContent);

var _FlowItemFlexibleContent = require('./FlowItemFlexibleContent');

var _FlowItemFlexibleContent2 = _interopRequireDefault(_FlowItemFlexibleContent);

var _FlowItemMoreContent = require('./FlowItemMoreContent');

var _FlowItemMoreContent2 = _interopRequireDefault(_FlowItemMoreContent);

var _constants = require('../constants');

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

function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }

var FlowItemContainer = _styledComponents2.default.div.withConfig({
  displayName: 'FlowItemContainer'
}).withConfig({
  displayName: 'FlowItemContainer'
})(['display:flex;flex-direction:column;font-size:1em;align-items:', ';& > .FlowItem-label{height:', ';margin:0 0 5.6px 0;overflow-x:hidden;flex-basis:', ';flex-grow:0;flex-shrink:0;padding:0;}& > ', '{height:', ';flex-grow:0;flex-shrink:0;display:flex;& > *{margin:auto;}& > *:not(:last-child):not(:only-child){margin-right:', ';}}& > ', '{height:auto;flex-basis:', ';flex-grow:1;flex-shrink:0;}& > .FlowItem-helpText{min-height:', ';margin:5.6px 0 0 0;flex-basis:', ';flex-grow:1;flex-shrink:0;padding:0;}& > ', '{flex:1 0 0;}'], function (_ref) {
  var alignment = _ref.alignment;

  switch (alignment) {
    case 'left':
      return 'flex-start';
    case 'right':
      return 'flex-end';
    default:
      return 'stretch';
  }
}, _constants.LABEL_HEIGHT, _constants.LABEL_HEIGHT, _FlowItemContent2.default, _constants.MIN_CONTENT_HEIGHT, _constants.HORIZONTAL_CONTENT_SPACING, _FlowItemFlexibleContent2.default, _constants.MIN_CONTENT_HEIGHT, _constants.MIN_HELP_TEXT_HEIGHT, _constants.MIN_HELP_TEXT_HEIGHT, _FlowItemMoreContent2.default);

FlowItemContainer.Small = FlowItemContainer.extend(_templateObject, _FlowItemContent2.default, _FlowItemFlexibleContent2.default);

exports.default = FlowItemContainer;