"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getStackedDisplay = 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;
  return stacked ? {
    flexDirection: stacked === 'column' ? 'column' : 'row',
    justifyContent: justify ? JUSTIFY_CONTENT_MAP[justify] : DEFAULT_JUSTIFY,
    alignItems: align ? ALIGN_CONTENT_MAP[align] : DEFAULT_ALIGN
  } : {};
};

exports.getStackedRules = getStackedRules;

var getStackedDisplay = function getStackedDisplay(_ref2) {
  var stacked = _ref2.stacked;
  return stacked ? 'flex' : undefined;
};

exports.getStackedDisplay = getStackedDisplay;