"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var are_gradients_equal_exports = {};
__export(are_gradients_equal_exports, {
  areGradientsEqual: () => areGradientsEqual
});
module.exports = __toCommonJS(are_gradients_equal_exports);
const areGradientsEqual = (gradient1, gradient2) => {
  if (gradient1.type !== gradient2.type) {
    return false;
  }
  if (gradient1.type === "LINEAR" && gradient2.type === "LINEAR") {
    if (gradient1.angle !== gradient2.angle) {
      return false;
    }
  } else if (gradient1.type === "RADIAL" && gradient2.type === "RADIAL") {
    if (gradient1.centerX !== gradient2.centerX || gradient1.centerY !== gradient2.centerY) {
      return false;
    }
  }
  const stops1 = gradient1.stops ?? [];
  const stops2 = gradient2.stops ?? [];
  if (stops1.length !== stops2.length) {
    return false;
  }
  return stops1.every((stop1, index) => {
    const stop2 = stops2[index];
    return stop1.color?.toUpperCase() === stop2.color?.toUpperCase() && stop1.position === stop2.position;
  });
};
//# sourceMappingURL=are-gradients-equal.js.map
