"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getStackedRules = void 0;
var JUSTIFY_CONTENT_MAP = {
  start: 'flex-start',
  end: 'flex-end',
  center: 'center',
  'space-between': 'space-between'
};
var DEFAULT_ALIGN = 'stretch';
var DEFAULT_JUSTIFY = 'flex-start';
var ALIGN_CONTENT_MAP = {
  start: 'flex-start',
  end: 'flex-end',
  center: 'center',
  stretch: 'stretch'
};

var getStackedRules = function getStackedRules(_ref) {
  var stacked = _ref.stacked,
      justify = _ref.justify,
      align = _ref.align;

  if (!stacked) {
    return '';
  }

  return ['display: flex;\n', "flex-direction: ".concat(stacked === 'column' ? 'column' : 'row', ";\n"), "justify-content: ".concat(justify ? JUSTIFY_CONTENT_MAP[justify] : DEFAULT_JUSTIFY, ";\n"), "align-items: ".concat(align ? ALIGN_CONTENT_MAP[align] : DEFAULT_ALIGN, ";\n")].join('');
};

exports.getStackedRules = getStackedRules;