"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 chunk_NM62A4NV_exports = {};
__export(chunk_NM62A4NV_exports, {
  handleUnexecutableSteps: () => handleUnexecutableSteps,
  init_handleEvaluateDataloss: () => init_handleEvaluateDataloss
});
module.exports = __toCommonJS(chunk_NM62A4NV_exports);
var import_chunk_F7KSWWYN = require("./chunk-F7KSWWYN.js");
var import_chunk_FVJ3R4NJ = require("./chunk-FVJ3R4NJ.js");
var import_internals = require("@prisma/internals");
function handleUnexecutableSteps(unexecutableSteps, createOnly = false) {
  if (unexecutableSteps && unexecutableSteps.length > 0) {
    const messages = [];
    messages.push(`${(0, import_chunk_F7KSWWYN.bold)((0, import_chunk_F7KSWWYN.red)("\n\u26A0\uFE0F We found changes that cannot be executed:\n"))}`);
    for (const item of unexecutableSteps) {
      messages.push(`${`  \u2022 Step ${item.stepIndex} ${item.message}`}`);
    }
    console.info();
    if (createOnly) {
      console.error(`${messages.join("\n")}
`);
      return void 0;
    } else {
      return `${messages.join("\n")}

You can use ${(0, import_internals.getCommandWithExecutor)(
        "prisma migrate dev --create-only"
      )} to create the migration file, and manually modify it to address the underlying issue(s).
Then run ${(0, import_internals.getCommandWithExecutor)("prisma migrate dev")} to apply it and verify it works.
`;
    }
  }
  return void 0;
}
var init_handleEvaluateDataloss = (0, import_chunk_FVJ3R4NJ.__esm)({
  "src/utils/handleEvaluateDataloss.ts"() {
    (0, import_chunk_F7KSWWYN.init_colors)();
  }
});
