"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);

// packages/editor/src/utils/sync-error-messages.js
var sync_error_messages_exports = {};
__export(sync_error_messages_exports, {
  getSyncErrorMessages: () => getSyncErrorMessages
});
module.exports = __toCommonJS(sync_error_messages_exports);
var import_i18n = require("@wordpress/i18n");
var ERROR_MESSAGES = {
  "authentication-failed": {
    title: (0, import_i18n.__)("Authentication Failed"),
    description: (0, import_i18n.__)(
      "Authentication with the collaborative editing server failed. Please verify that you have the necessary permissions."
    )
  },
  "connection-expired": {
    title: (0, import_i18n.__)("Connection Expired"),
    description: (0, import_i18n.__)(
      "The connection to the collaborative editing server has expired."
    )
  },
  "connection-limit-exceeded": {
    title: (0, import_i18n.__)("Connection Limit Exceeded"),
    description: (0, import_i18n.__)(
      "The collaborative editing server has reached its maximum connection capacity. Please try again later or contact your site administrator."
    )
  },
  "unknown-error": {
    title: (0, import_i18n.__)("Disconnected"),
    description: (0, import_i18n.__)(
      "You are currently disconnected from the collaborative editing server. Editing is temporarily disabled to prevent conflicts."
    )
  }
};
function getSyncErrorMessages(error) {
  if (ERROR_MESSAGES[error?.code]) {
    return ERROR_MESSAGES[error.code];
  }
  return ERROR_MESSAGES["unknown-error"];
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  getSyncErrorMessages
});
//# sourceMappingURL=sync-error-messages.cjs.map
