/**
 * Global window type definitions for WooNooW
 */

interface WNW_API_Config {
  root: string;
  nonce: string;
  isDev: boolean;
}

interface WNW_Config {
  siteTitle?: string;
}

interface WNW_WC_MENUS {
  items?: any[];
}

interface WNW_CONFIG {
  standaloneMode?: boolean;
  restUrl?: string;
  wpAdminUrl?: string;
  siteUrl?: string;
  siteName?: string;
  isAuthenticated?: boolean;
  currentUser?: {
    id: number;
    name: string;
    email: string;
  };
  user?: {
    id: number;
    name: string;
    email: string;
  };
  store?: {
    currency: string;
    currencySymbol: string;
    currencyPosition: string;
    thousandSeparator: string;
    decimalSeparator: string;
    decimals: number;
  };
}

declare global {
  interface Window {
    WNW_API?: WNW_API_Config;
    wnw?: WNW_Config;
    WNW_WC_MENUS?: WNW_WC_MENUS;
    WNW_CONFIG?: WNW_CONFIG;
  }
}

export {};
