export const waterMarkTypes = [{
  label: '文本',
  value: 'TEXT'
}, {
  label: '图片',
  value: 'IMG'
}];

/**
 * 默认配置
 */
export const DEFAULT_OPTIONS = {
  textMaxLength: 10,
  markType: 'TEXT',
  gravity: 'center',
  dissolve: 0.9,
  textFontSize: 20,
  textDegree: 45,
  batch: 0,
  spcent: 25,
  textFontColor: '#ffffff'
};
export const defaultWaterType = 'TEXT';
export const defaultFontSizeMin = 1;
export const defaultFontSizeMax = 100;
export const defaultSpcentMin = 1;
export const defaultSpcentMax = 250;
export const padding = 0; // 20;

export const opacityOptions = [0.9, 0.75, 0.5, 0.25];
export const degreeOptions = [20, 30, 45, 60];
export const markTypeOptions = ['TEXT', 'IMG'];
export const positionOptions = ['northwest', 'north', 'northeast', 'west', 'center', 'east', 'southwest', 'south', 'southeast'];
export const GRAVITY_POSITION_MAP = {
  northwest: 'upperLeft',
  north: 'northCenter',
  northeast: 'upperRight',
  west: 'westCenter',
  center: 'center',
  east: 'eastCenter',
  southwest: 'lowerLeft',
  south: 'southCenter',
  southeast: 'lowerRight'
};
export const colorList = ['#014FE0', '#0ABF5B', '#FDE300', '#FF9D00', '#E54545', '#C02FEB', '#722ED1', '#13C2C2', '#262626', '#595959', '#8C8C8C', '#BFBFBF'];
export const batchOptionsElement = [{
  value: 0,
  label: '单文字'
}, {
  value: 1,
  label: '平铺'
}];
export const opacityOptionsElement = [{
  value: 0.9,
  label: '不透明'
}, {
  value: 0.75,
  label: '25%透明'
}, {
  value: 0.5,
  label: '50%透明'
}, {
  value: 0.25,
  label: '75%透明'
}];
export const degreeOptionsElement = [{
  value: 20,
  label: '20°'
}, {
  value: 30,
  label: '30°'
}, {
  value: 45,
  label: '45°'
}, {
  value: 60,
  label: '60°'
}];
export const waterMarkOptions = {
  init(img) {
    img.crossOrigin = 'anonymous';
  }
};