/**
 * Mock for @paralleldrive/cuid2
 * Used in Jest tests to avoid ES module issues
 */

let counter = 0;

const createId = () => `test_cuid_${++counter}_${Date.now()}`;

const init = () => createId;

const isCuid = (id) => typeof id === "string" && id.startsWith("test_cuid_");

const getConstants = () => ({
  defaultLength: 24,
  bigLength: 32,
});

module.exports = {
  createId,
  init,
  isCuid,
  getConstants,
};
