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

declare module '*.vue' {
  import type { DefineComponent } from 'vue'
  const component: DefineComponent<{}, {}, unknown>
  export default component
}

interface ComponentConstructor<P = any> {
  new (...args: any[]): {
    $props: P
  }
}

interface ImportMetaEnv {
  readonly VITE_SERVER: string
  readonly VITE_REGISTER: string
  readonly VITE_FORGET: string
  readonly MODE: 'ja' | 'development' | 'prod'
  readonly VITE_USER_INFO: string
}

interface ImportMeta {
  readonly env: ImportMetaEnv
}

type PartialPart<T extends {}, K extends keyof T> = Omit<T, K> &
  Partial<Pick<T, K>>

declare type I18nGlobalTranslation = {
  (key: string): string
  (key: string, locale: string): string
  (key: string, locale: string, list: unknown[]): string
  (key: string, locale: string, named: Record<string, unknown>): string
  (key: string, list: unknown[]): string
  (key: string, named: Record<string, unknown>): string
}

declare const $t: I18nGlobalTranslation
