import { BASE_PROVIDERS } from "../components/providers/base";
import saletaskmxProvider from "../components/providers/saletaskmx";
import outwareProvider from "../components/providers/outware";

/**
 * @description 打印模板
 */
export namespace HiprintTemplateType {
  /**
   * @name main 打印模板格式-底层格式
   */
  export interface Providers {
    /**
     * @description key
     */
    key: string;
    /**
     * @description 模板id
     */
    options?: ProvidersGroup[];
  }
  /**
   * @name item 打印模板格式-gourp
   */
  export interface ProvidersGroup {
    /**
     * @description 分组名称
     */
    groupName: string;
    /**
     * @description 分组item
     */
    printElements: any;
  }
}

/**
 * @description 各窗口对应的打印设计器元素
 */
export const PRINT_DWNAME_ENUM: { [key: string]: HiprintTemplateType.Providers } = {
  default: {
    key: "ljProviderDefalut",
    options: [BASE_PROVIDERS]
  },
  u_saletask: saletaskmxProvider,
  web_fx_outware_print_template: outwareProvider
};

/**
 * @description 各窗口对应的打印窗口名称,导出文件名
 */
export const PRINT_DWNAME_NAME: any = {
  default: "打印模板",
  u_saletask: "销售订单打印模板",
  web_fx_outware_print_template: "发货单打印模板"
};
