export type ProjectMode = 'new' | 'existing' | 'multi-repo';
export type StorageMode = 'local' | 'home' | 'custom';
export type TDDEnforcement = 'strict' | 'advisory' | 'off';

export interface RepositoryConfig {
  name: string;
  path: string;
  primary?: boolean;
  type?: 'git' | 'svn' | 'mercurial';
}

export interface IntegrationConfig {
  respectGitignore?: boolean;
  preserveExisting?: boolean;
  modules?: {
    kanban?: boolean;
    development?: boolean;
    documentation?: boolean;
    business?: boolean;
    agile?: boolean;
    memory?: boolean;
    'product-requirements'?: boolean;
    'product-roadmap'?: boolean;
    'adr-management'?: boolean;
    'code-analysis'?: boolean;
    'testing-framework'?: boolean;
    'deployment-management'?: boolean;
    'git-workflow'?: boolean;
    'task-orchestration'?: boolean;
  };
}

export interface DashboardConfig {
  enabled?: boolean;
  port?: number;
  host?: string;
  autoOpen?: boolean;
  features?: {
    performance?: boolean;
    security?: boolean;
    agile?: boolean;
    errors?: boolean;
  };
  realTimeUpdates?: boolean;
  exportEnabled?: boolean;
}

export interface FeaturesConfig {
  tddEnforcement?: TDDEnforcement;
  autoInit?: boolean;
  autoBackup?: boolean;
  syncEnabled?: boolean;
}

export interface StorageConfig {
  mode: StorageMode;
  path?: string;
  isolation?: 'project' | 'workspace' | 'global';
}

export interface AtlasConfig {
  projectMode: ProjectMode;
  projectName?: string;
  workspaceRoot?: string;
  dataLocation?: string;
  repositories?: RepositoryConfig[];
  integration?: IntegrationConfig;
  features?: FeaturesConfig;
  storage?: StorageConfig;
  webDashboard?: DashboardConfig;
  version?: string;
}

export interface ProjectDetectionResult {
  hasGit: boolean;
  hasPackageJson: boolean;
  hasTsConfig: boolean;
  hasTests: boolean;
  testFramework?: 'jest' | 'mocha' | 'vitest' | 'other';
  projectType?: 'node' | 'python' | 'ruby' | 'other';
  suggestedMode: ProjectMode;
  existingTools: string[];
}