import { initAdminConfig } from '~/server/utils/admin-config';

export default defineNitroPlugin(async (nitroApp) => {
  console.log('[server/plugins/admin-config-init] Initializing admin configuration system...');
  
  try {
    await initAdminConfig();
    console.log('[server/plugins/admin-config-init] ✅ Admin configuration system initialized successfully');
  } catch (error) {
    console.error('[server/plugins/admin-config-init] ❌ Failed to initialize admin configuration system:', error);
    // Don't throw error to prevent server startup failure
  }
});
