import { _RouteRecordBase, RouteRecordRaw } from 'vue-router';

declare module 'vue-router' {
  interface _RouteRecordBase  {
    hidden?: boolean;
    permissions?: string[];
    roles?: string[];
    component?: any;
    children?: RouteOption[];
    alwaysShow?: boolean;
    parentPath?: string;
    meta?: {
      title: string;
      icon: string;
    };
    query?: string;
  }
  declare type RouteOption =  RouteOptionObj & RouteRecordRaw & {
      children?: RouteOption[];

  };

  declare interface _RouteLocationBase {
    children?: RouteOption[];
  }

  declare interface RouteLocationOptions {
    fullPath?: string;
  }

  declare interface TagView extends Partial<_RouteLocationBase> {
    title?: string;
    meta?: {
      link?: string;
      title?: string;
      affix?: boolean;
      noCache?: boolean;
        dynamicTitle?: string;
    };
  }
    interface Router {
        pushTarget: (url: string, query?: Record<string, any>) => void
    }
}
