/**
 * Veza Fixtures Core Module
 * 
 * Main entry point for the fixtures system
 */

// Core configuration
export { loadConfig, setGlobalConfig, globalConfig, type FixtureConfig } from './config'

// Data schemas
export * from './schemas/database'

// Utilities
export { VezaFaker, vezaFaker } from './utils/faker-config'
export { DataRelationManager } from './utils/data-relations'

// Generators
export { UserGenerator } from './generators/users'
export { AudioGenerator } from './generators/audio'
export { ConversationGenerator } from './generators/conversations'

// Main fixtures class
export class VezaFixtures {
  /**
   * Initialize the fixtures system
   */
  static async initialize(environment: string = 'development'): Promise<void> {
    const { loadConfig, setGlobalConfig } = await import('./config')
    const config = loadConfig(environment)
    setGlobalConfig(config)
    
    console.log(`🎵 Veza Fixtures initialized for environment: ${environment}`)
  }
  
  /**
   * Generate complete dataset with relationships
   */
  static generateCompleteDataset() {
    const { DataRelationManager } = require('./utils/data-relations')
    return DataRelationManager.generateCompleteDataset()
  }
  
  /**
   * Validate data relationships
   */
  static validateRelations() {
    const { DataRelationManager } = require('./utils/data-relations')
    return DataRelationManager.validateRelations()
  }
  
  /**
   * Get generation statistics
   */
  static getStatistics() {
    const { DataRelationManager } = require('./utils/data-relations')
    return DataRelationManager.getStatistics()
  }
  
  /**
   * Clear all generated data
   */
  static clearAll(): void {
    const { DataRelationManager } = require('./utils/data-relations')
    DataRelationManager.clearAll()
  }
  
  /**
   * Export data in different formats
   */
  static exportData(format: 'database' | 'api' = 'database') {
    const { DataRelationManager } = require('./utils/data-relations')
    if (format === 'api') {
      return DataRelationManager.exportForAPI()
    }
    return DataRelationManager.exportForDatabase()
  }
}