"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.compareDesignAreasBySize = compareDesignAreasBySize;
/**
 * Compares design areas by size.
 *
 * @param {Object} firstDesignArea
 * @param {Object} firstDesignArea.baseShape
 * @param {number} firstDesignArea.baseShape.width
 * @param {number} firstDesignArea.baseShape.height
 * @param {Object} secondDesignArea
 * @param {Object} secondDesignArea.baseShape
 * @param {number} secondDesignArea.baseShape.width
 * @param {number} secondDesignArea.baseShape.height
 * @returns {number}
 */
function compareDesignAreasBySize(_ref, _ref2) {
  var firstBaseShape = _ref.baseShape;
  var secondBaseShape = _ref2.baseShape;
  if (!firstBaseShape || !secondBaseShape) {
    return 0;
  }
  var firstSize = firstBaseShape.width * firstBaseShape.height;
  var secondSize = secondBaseShape.width * secondBaseShape.height;
  return secondSize - firstSize;
}