/// <reference types="vite/client" />

/**
 * Global window config from WordPress
 */
declare global {
  interface Window {
    varihuConfig: {
      restUrl: string;
      nonce: string;
      locale: string;
      ajaxUrl: string; // ✅ SECURITY FIX: Dynamic admin-ajax.php URL from WordPress
      pluginUrl: string;
      version: string;
      currentUser: {
        id: number;
        name: string;
        email: string;
      };
    };
  }

  // WordPress Media Library
  const wp: {
    media: (options?: any) => any;
  };
}

export {};
