import type { InstallationProfile } from './installation-profile';

export interface SetupTemplateDefinition {
  file: string;
  seedType: string;
  importOrder: number;
  supported: boolean;
  requiredColumns: string[];
  description: string;
  plugin: string;
  profiles: string[];
}

export interface SetupWizardStep {
  key: string;
  title: string;
  description: string;
  required: boolean;
  produces: string[];
  invalidates: string[];
}

export interface SetupReadinessCheck {
  id: string;
  area: string;
  name: string;
  requiredFor: string[];
  purpose: string;
  suggestedFix?: string;
}

export interface SetupVerificationCheck extends SetupReadinessCheck {}

export interface ResetScopeDefinition {
  key: string;
  destructive: boolean;
  allowedEnvironments: string[];
  requiresTypedConfirmation: boolean;
  affectedTables: string[];
  storageCleanup: 'none' | 'report_only' | 'best_effort';
}

export interface ReseedTargetDefinition {
  key: string;
  description: string;
  executable: boolean;
}

export interface CsvPreviewValidator {
  key: string;
  description: string;
}

export interface CsvImporter {
  key: string;
  description: string;
}

export interface GoldenDatasetDefinition {
  key: string;
  path: string;
  files: string[];
}

export interface SetupPlugin {
  id: string;
  version: string;
  displayName: string;
  description: string;
  dependencies: string[];
  installationProfiles(): InstallationProfile[];
  templates(): SetupTemplateDefinition[];
  wizardSteps(): SetupWizardStep[];
  readinessChecks(): SetupReadinessCheck[];
  verificationChecks(): SetupVerificationCheck[];
  previewValidators(): CsvPreviewValidator[];
  importHandlers(): CsvImporter[];
  resetScopes(): ResetScopeDefinition[];
  reseedTargets(): ReseedTargetDefinition[];
  goldenDatasets(): GoldenDatasetDefinition[];
}
