/**
 * Types and constants for the Project Creation Wizard
 */

import type { LucideIcon } from 'lucide-react';

/**
 * Project complexity levels matching backend enum
 */
export type ProjectComplexity = 'script' | 'simple' | 'medium' | 'complex';

/**
 * Client interaction mode matching backend enum
 */
export type ClientMode = 'technical' | 'auto';

/**
 * Autonomy level matching backend enum
 */
export type AutonomyLevel = 'full_control' | 'milestone' | 'autonomous';

/**
 * Wizard step numbers
 */
export type WizardStep = 1 | 2 | 3 | 4 | 5 | 6;

/**
 * Full wizard state
 */
export interface WizardState {
  step: WizardStep;
  projectName: string;
  description: string;
  repoUrl: string;
  complexity: ProjectComplexity | null;
  clientMode: ClientMode | null;
  autonomyLevel: AutonomyLevel | null;
}

/**
 * Complexity option configuration
 */
export interface ComplexityOption {
  id: ProjectComplexity;
  label: string;
  icon: LucideIcon;
  description: string;
  scope: string;
  examples: string;
  skipConfig: boolean;
}

/**
 * Client mode option configuration
 */
export interface ClientModeOption {
  id: ClientMode;
  label: string;
  icon: LucideIcon;
  description: string;
  details: string[];
}

/**
 * Approval types for autonomy matrix
 */
export interface ApprovalMatrix {
  codeChanges: boolean;
  issueUpdates: boolean;
  architectureDecisions: boolean;
  sprintPlanning: boolean;
  deployments: boolean;
}

/**
 * Autonomy option configuration
 */
export interface AutonomyOption {
  id: AutonomyLevel;
  label: string;
  icon: LucideIcon;
  description: string;
  approvals: ApprovalMatrix;
  recommended: string;
}

/**
 * Initial wizard state
 */
export const initialWizardState: WizardState = {
  step: 1,
  projectName: '',
  description: '',
  repoUrl: '',
  complexity: null,
  clientMode: null,
  autonomyLevel: null,
};

/**
 * Human-readable labels for approval matrix keys
 */
export const approvalLabels: Record<keyof ApprovalMatrix, string> = {
  codeChanges: 'Code Changes',
  issueUpdates: 'Issue Updates',
  architectureDecisions: 'Architecture Decisions',
  sprintPlanning: 'Sprint Planning',
  deployments: 'Deployments',
};
