"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.formatSpacing = formatSpacing;
exports.getColClassAndStyle = getColClassAndStyle;
var _utils = require("@teamix/utils");
var cls = (0, _utils.usePrefixCls)('teamix-pro-card');
function formatSpacing(spacing) {
  var spacingArray = spacing instanceof Array ? spacing : [spacing || 0, spacing || 0];
  return {
    horizonal: spacingArray[0] / 2,
    vertical: spacingArray[1] / 2
  };
}
function getColClassAndStyle(col) {
  if (!col) {
    return {
      style: {}
    };
  }
  if (typeof col === 'number') {
    return {
      className: cls("col-".concat(col)),
      style: {}
    };
  }
  return {
    style: {
      width: col,
      flexShrink: 0
    }
  };
}