declare module 'vue-plugin-hiprint' {
  export const hiprint: any
  export const defaultElementTypeProvider: any
}

declare module '*.js' {
  const content: any
  export default content
}

// 声明 jQuery（若项目已安装 @types/jquery 可省略）
declare let $: any
declare let jQuery: any

// hiprint 核心类型声明（简化版，可根据实际扩展）
declare namespace Hiprint {
  interface PrintTemplate {
    new (options: any): PrintTemplate
    design: (selector: string, options: any) => void
    setPaper: (width: number | string, height: number | string) => void
    zoom: (scale: number) => void
    rotatePaper: () => void
    print2: (data: any, options: any) => void
    getPrinterList: () => any[]
    getSelectEls: () => any[]
    editingPanel: {
      scale: number
      printElements: any[]
    }
    setFontList: (fontList: Array<{ title: string; value: string }>) => void
    on: (event: string, callback: () => void) => void
  }

  interface HiprintInstance {
    init: (options: { providers: any[]; lang: string }) => void
    setConfig: (config?: any) => void
    PrintElementTypeManager: {
      buildByHtml: (el: any) => void
    }
    updateElementType: (type: string, callback: (type: any) => any) => void
    refreshPrinterList: (callback: (list: any[]) => void) => void
    getAddress: (type: string, callback: (data: any) => void, ...args: any[]) => void
  }

  interface Window {
    'vue-plugin-hiprint': {
      hiprint: HiprintInstance
      defaultElementTypeProvider: any
    }
    hiwebSocket: {
      opened: boolean
      host: string
    }
    $print: any
    $print2: any
  }
}

declare const hiprint: Hiprint.HiprintInstance
declare let hiprintTemplate: Hiprint.PrintTemplate
declare let defaultElementTypeProvider: any
declare let panel: any
