"use strict";
/* Socket Lib - Built with esbuild */
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 flags_exports = {};
__export(flags_exports, {
  COMMON_FLAGS: () => COMMON_FLAGS,
  getLogLevel: () => getLogLevel,
  isAll: () => isAll,
  isChanged: () => isChanged,
  isCoverage: () => isCoverage,
  isDebug: () => isDebug,
  isDryRun: () => isDryRun,
  isFix: () => isFix,
  isForce: () => isForce,
  isHelp: () => isHelp,
  isJson: () => isJson,
  isQuiet: () => isQuiet,
  isStaged: () => isStaged,
  isUpdate: () => isUpdate,
  isVerbose: () => isVerbose,
  isWatch: () => isWatch
});
module.exports = __toCommonJS(flags_exports);
const processArg = [...process.argv];
function getLogLevel(input) {
  if (isQuiet(input)) {
    return "silent";
  }
  if (isDebug(input)) {
    return "debug";
  }
  if (isVerbose(input)) {
    return "verbose";
  }
  return "info";
}
function isAll(input) {
  if (!input) {
    return processArg.includes("--all");
  }
  if (Array.isArray(input)) {
    return input.includes("--all");
  }
  return !!input.all;
}
function isChanged(input) {
  if (!input) {
    return processArg.includes("--changed");
  }
  if (Array.isArray(input)) {
    return input.includes("--changed");
  }
  return !!input.changed;
}
function isCoverage(input) {
  if (!input) {
    return processArg.includes("--coverage") || processArg.includes("--cover");
  }
  if (Array.isArray(input)) {
    return input.includes("--coverage") || input.includes("--cover");
  }
  return !!(input.coverage || input.cover);
}
function isDebug(input) {
  if (!input) {
    return processArg.includes("--debug");
  }
  if (Array.isArray(input)) {
    return input.includes("--debug");
  }
  return !!input.debug;
}
function isDryRun(input) {
  if (!input) {
    return processArg.includes("--dry-run");
  }
  if (Array.isArray(input)) {
    return input.includes("--dry-run");
  }
  return !!input["dry-run"];
}
function isFix(input) {
  if (!input) {
    return processArg.includes("--fix");
  }
  if (Array.isArray(input)) {
    return input.includes("--fix");
  }
  return !!input.fix;
}
function isForce(input) {
  if (!input) {
    return processArg.includes("--force");
  }
  if (Array.isArray(input)) {
    return input.includes("--force");
  }
  return !!input.force;
}
function isHelp(input) {
  if (!input) {
    return processArg.includes("--help") || processArg.includes("-h");
  }
  if (Array.isArray(input)) {
    return input.includes("--help") || input.includes("-h");
  }
  return !!input.help;
}
function isJson(input) {
  if (!input) {
    return processArg.includes("--json");
  }
  if (Array.isArray(input)) {
    return input.includes("--json");
  }
  return !!input.json;
}
function isQuiet(input) {
  if (!input) {
    return processArg.includes("--quiet") || processArg.includes("--silent");
  }
  if (Array.isArray(input)) {
    return input.includes("--quiet") || input.includes("--silent");
  }
  return !!(input.quiet || input.silent);
}
function isStaged(input) {
  if (!input) {
    return processArg.includes("--staged");
  }
  if (Array.isArray(input)) {
    return input.includes("--staged");
  }
  return !!input.staged;
}
function isUpdate(input) {
  if (!input) {
    return processArg.includes("--update") || processArg.includes("-u");
  }
  if (Array.isArray(input)) {
    return input.includes("--update") || input.includes("-u");
  }
  return !!input.update;
}
function isVerbose(input) {
  if (!input) {
    return processArg.includes("--verbose");
  }
  if (Array.isArray(input)) {
    return input.includes("--verbose");
  }
  return !!input.verbose;
}
function isWatch(input) {
  if (!input) {
    return processArg.includes("--watch") || processArg.includes("-w");
  }
  if (Array.isArray(input)) {
    return input.includes("--watch") || input.includes("-w");
  }
  return !!input.watch;
}
const COMMON_FLAGS = {
  all: {
    type: "boolean",
    default: false,
    description: "Target all files"
  },
  changed: {
    type: "boolean",
    default: false,
    description: "Target changed files"
  },
  coverage: {
    type: "boolean",
    default: false,
    description: "Run with coverage"
  },
  cover: {
    type: "boolean",
    default: false,
    description: "Run with coverage (alias)"
  },
  debug: {
    type: "boolean",
    default: false,
    description: "Enable debug output"
  },
  "dry-run": {
    type: "boolean",
    default: false,
    description: "Perform a dry run"
  },
  fix: {
    type: "boolean",
    default: false,
    description: "Automatically fix issues"
  },
  force: {
    type: "boolean",
    default: false,
    description: "Force the operation"
  },
  help: {
    type: "boolean",
    default: false,
    short: "h",
    description: "Show help"
  },
  json: {
    type: "boolean",
    default: false,
    description: "Output as JSON"
  },
  quiet: {
    type: "boolean",
    default: false,
    short: "q",
    description: "Suppress output"
  },
  silent: {
    type: "boolean",
    default: false,
    description: "Suppress all output"
  },
  staged: {
    type: "boolean",
    default: false,
    description: "Target staged files"
  },
  update: {
    type: "boolean",
    default: false,
    short: "u",
    description: "Update snapshots/deps"
  },
  verbose: {
    type: "boolean",
    default: false,
    short: "v",
    description: "Verbose output"
  },
  watch: {
    type: "boolean",
    default: false,
    short: "w",
    description: "Watch mode"
  }
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  COMMON_FLAGS,
  getLogLevel,
  isAll,
  isChanged,
  isCoverage,
  isDebug,
  isDryRun,
  isFix,
  isForce,
  isHelp,
  isJson,
  isQuiet,
  isStaged,
  isUpdate,
  isVerbose,
  isWatch
});
