"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 copy_exports = {};
__export(copy_exports, {
  copy: () => copy
});
module.exports = __toCommonJS(copy_exports);
var import_prop_controllers = require("@makeswift/prop-controllers");
var import_descriptors = require("./descriptors");
function copy(descriptor, value, context) {
  if (!(0, import_descriptors.isLegacyDescriptor)(descriptor)) {
    return descriptor.copyData(value, context);
  }
  switch (descriptor.type) {
    case import_prop_controllers.Types.Backgrounds:
      return (0, import_prop_controllers.copyBackgroundsPropControllerData)(descriptor, value, context);
    case import_prop_controllers.Types.Grid:
      return (0, import_prop_controllers.copyGridPropControllerData)(value, context);
    case import_prop_controllers.Types.NavigationLinks:
      return (0, import_prop_controllers.copyNavigationLinksPropControllerData)(value, context);
    case import_prop_controllers.Types.Link:
      return (0, import_prop_controllers.copyLinkPropControllerData)(value, context);
    case import_prop_controllers.Types.Shadows:
      return (0, import_prop_controllers.copyShadowsPropControllerData)(value, context);
    case import_prop_controllers.Types.Image:
      return (0, import_prop_controllers.copyImagePropControllerData)(value, context);
    case import_prop_controllers.Types.Images:
      return (0, import_prop_controllers.copyImagesPropControllerData)(value, context);
    case import_prop_controllers.Types.ResponsiveColor:
      return (0, import_prop_controllers.copyResponsiveColorPropControllerData)(value, context);
    case import_prop_controllers.Types.TableFormFields:
      return (0, import_prop_controllers.copyTablePropControllerData)(value, context);
    case import_prop_controllers.Types.Table:
      return (0, import_prop_controllers.copyTablePropControllerData)(value, context);
    case import_prop_controllers.Types.Border:
      return (0, import_prop_controllers.copyBorderPropControllerData)(value, context);
    case import_prop_controllers.Types.ElementID:
      return (0, import_prop_controllers.copyElementIDPropControllerData)(value, context);
    default:
      return value;
  }
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  copy
});
//# sourceMappingURL=copy.js.map