'use strict';

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

require('../../../utils/index.cjs');
var _class = require('../../../utils/dom/class.cjs');

const flexWrapValues = ["wrap", "nowrap", "wrap-reverse"];
const justifyContentValues = [
  "flex-start",
  "flex-end",
  "start",
  "end",
  "center",
  "space-between",
  "space-around",
  "space-evenly",
  "stretch",
  "normal",
  "left",
  "right"
];
const alignItemsValues = [
  "center",
  "start",
  "end",
  "flex-start",
  "flex-end",
  "self-start",
  "self-end",
  "baseline",
  "normal",
  "stretch"
];
function genClsWrap(prefixCls, props) {
  const wrapCls = {};
  flexWrapValues.forEach((cssKey) => {
    wrapCls[`${prefixCls}-wrap-${cssKey}`] = props.wrap === cssKey;
  });
  return wrapCls;
}
function genClsAlign(prefixCls, props) {
  const alignCls = {};
  alignItemsValues.forEach((cssKey) => {
    alignCls[`${prefixCls}-align-${cssKey}`] = props.align === cssKey;
  });
  alignCls[`${prefixCls}-align-stretch`] = !props.align && !!props.vertical;
  return alignCls;
}
function genClsJustify(prefixCls, props) {
  const justifyCls = {};
  justifyContentValues.forEach((cssKey) => {
    justifyCls[`${prefixCls}-justify-${cssKey}`] = props.justify === cssKey;
  });
  return justifyCls;
}
function createFlexClassNames(prefixCls, props) {
  return _class.classNames({
    ...genClsWrap(prefixCls, props),
    ...genClsAlign(prefixCls, props),
    ...genClsJustify(prefixCls, props)
  });
}

exports.alignItemsValues = alignItemsValues;
exports.default = createFlexClassNames;
exports.flexWrapValues = flexWrapValues;
exports.justifyContentValues = justifyContentValues;
//# sourceMappingURL=util.cjs.map
