import * as React from 'react';
export type WaterSwitch = 1 | 2 | 3
export interface WaterMakeRule {
  id: number | string;
  operationId?: number | string;
  realName?: 1 | 2;
  ip?: 1 | 2;
  sysDate?: 1 | 2;
  showLevel?: 1 | 2 | 3;
  phoneNum?: 1 | 2;
  isUsed?: 1 | 2;
  waterContent: string;
  waterType?: 1 | 2;
  imgType: 1 | 2 | 3;
  clientIp?: string;
  systemTime?: string;
  updated?: string;
  create_time?: string;
  waterMark?: string[] | string;
  transparency?: number;
  fontSize?: number;
}
interface WaterMakeDomProps {
  className?: string
  waterMakeRule?: WaterMakeRule
  imgType?: WaterMakeRule['imgType']
  waterSwitch?: WaterSwitch
}
interface WaterMakeDomState {
  rules: WaterMakeRule[]
  isCompulsory: WaterSwitch
}
interface WaterMakeDomStore {
  state: WaterMakeDomState
  loadState(refresh?: boolean): Promise<WaterMakeDomState>
};
export interface WaterMakeDomUtils {
  createNewImage(
    params: { contents: string[], fontSize?: number, rotate?: number, width: number, height: number, density?: WaterMakeRule['showLevel'], opacity: number }
  ): HTMLCanvasElement
  getWaterMarkContent(waterMakeRule: WaterMakeRule): string[]
  getWaterMarkUseState(waterMakeRule: WaterMakeRule, watetswitch: WaterSwitch): boolean
}
export interface ResData<T> {
  code: number
  message: string
  data: T
}
export interface WaterMarkService {
  getWaterMark(data: { operationId: string }): Promise<ResData<{ isCompulsory: 1 | 2 | 3, watermarkRulesList: WaterMakeRule[] }>>
}

declare const WaterMakeDom: React.FC<WaterMakeDomProps> & { store: WaterMakeDomStore, utils: WaterMakeDomUtils };
export default WaterMakeDom;