import {
  validateInitiativeEditArgs,
  validateWuValidateArgs
} from "./chunk-2GXVIN57.js";

// src/shared-validators.ts
function normalizeInitiativeEditCliArgs(args) {
  return {
    id: args.id,
    status: args.status,
    blocked_by: args.blockedBy,
    blocked_reason: args.blockedReason,
    unblock: args.unblock,
    add_lane: args.addLane,
    remove_lane: args.removeLane,
    notes: args.notes,
    description: args.description,
    add_phase: args.addPhase,
    add_success_metric: args.addSuccessMetric,
    remove_success_metric: args.removeSuccessMetric,
    phase_id: args.phaseId,
    phase_status: args.phaseStatus,
    phase_title: args.phaseTitle,
    created: args.created
  };
}
function validateInitiativeEditCliArgs(args) {
  return validateInitiativeEditArgs(normalizeInitiativeEditCliArgs(args));
}
function validateWuValidateCliArgs(args) {
  return validateWuValidateArgs({
    id: args.id,
    no_strict: args.noStrict
  });
}
function validateWuProtoCliArgs(args) {
  const normalized = {
    lane: args.lane,
    title: args.title,
    description: args.description,
    code_paths: args.codePaths,
    labels: args.labels,
    assigned_to: args.assignedTo
  };
  const errors = [];
  if (!normalized.lane || normalized.lane.trim() === "") {
    errors.push("lane is required");
  }
  if (!normalized.title || normalized.title.trim() === "") {
    errors.push("title is required");
  }
  return {
    valid: errors.length === 0,
    errors,
    warnings: [],
    normalized
  };
}

export {
  validateInitiativeEditCliArgs,
  validateWuValidateCliArgs,
  validateWuProtoCliArgs
};
