/**
 * Type declarations for hh-router-guard module
 */

declare module '@/uni_modules/hh-router-guard/src/index' {
  import type { App } from 'vue';
  
  export interface RouterGuardOptions {
    whiteList?: string[];
    loginPath?: string;
    checkLogin?: () => boolean;
    loginHandler?: (to: string) => void;
    errorHandler?: (error: Error) => void;
  }
  
  export interface RouterGuardInstance {
    install: (app: App, options?: RouterGuardOptions) => void;
  }
  
  const routerGuard: RouterGuardInstance;
  export default routerGuard;
}

// Also declare the module for the types file
declare module '@/uni_modules/hh-router-guard/src/types' {
  export interface RouterGuardOptions {
    whiteList?: string[];
    loginPath?: string;
    checkLogin?: () => boolean;
    loginHandler?: (to: string) => void;
    errorHandler?: (error: Error) => void;
  }
  
  export interface RouterGuardInstance {
    config: Required<RouterGuardOptions>;
    check: (path: string) => boolean;
  }
  
  export interface Plugin {
    install: (app: import('vue').App, ...options: any[]) => any;
  }
}
