"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.waterMarkTypes = exports.waterMarkOptions = exports.positionOptions = exports.padding = exports.opacityOptionsElement = exports.opacityOptions = exports.markTypeOptions = exports.degreeOptionsElement = exports.degreeOptions = exports.defaultWaterType = exports.defaultSpcentMin = exports.defaultSpcentMax = exports.defaultFontSizeMin = exports.defaultFontSizeMax = exports.colorList = exports.batchOptionsElement = exports.GRAVITY_POSITION_MAP = exports.DEFAULT_OPTIONS = void 0;
const waterMarkTypes = [{
  label: '文本',
  value: 'TEXT'
}, {
  label: '图片',
  value: 'IMG'
}];

/**
 * 默认配置
 */
exports.waterMarkTypes = waterMarkTypes;
const DEFAULT_OPTIONS = {
  textMaxLength: 10,
  markType: 'TEXT',
  gravity: 'center',
  dissolve: 0.9,
  textFontSize: 20,
  textDegree: 45,
  batch: 0,
  spcent: 25,
  textFontColor: '#ffffff'
};
exports.DEFAULT_OPTIONS = DEFAULT_OPTIONS;
const defaultWaterType = 'TEXT';
exports.defaultWaterType = defaultWaterType;
const defaultFontSizeMin = 1;
exports.defaultFontSizeMin = defaultFontSizeMin;
const defaultFontSizeMax = 100;
exports.defaultFontSizeMax = defaultFontSizeMax;
const defaultSpcentMin = 1;
exports.defaultSpcentMin = defaultSpcentMin;
const defaultSpcentMax = 250;
exports.defaultSpcentMax = defaultSpcentMax;
const padding = 0; // 20;
exports.padding = padding;
const opacityOptions = [0.9, 0.75, 0.5, 0.25];
exports.opacityOptions = opacityOptions;
const degreeOptions = [20, 30, 45, 60];
exports.degreeOptions = degreeOptions;
const markTypeOptions = ['TEXT', 'IMG'];
exports.markTypeOptions = markTypeOptions;
const positionOptions = ['northwest', 'north', 'northeast', 'west', 'center', 'east', 'southwest', 'south', 'southeast'];
exports.positionOptions = positionOptions;
const GRAVITY_POSITION_MAP = {
  northwest: 'upperLeft',
  north: 'northCenter',
  northeast: 'upperRight',
  west: 'westCenter',
  center: 'center',
  east: 'eastCenter',
  southwest: 'lowerLeft',
  south: 'southCenter',
  southeast: 'lowerRight'
};
exports.GRAVITY_POSITION_MAP = GRAVITY_POSITION_MAP;
const colorList = ['#014FE0', '#0ABF5B', '#FDE300', '#FF9D00', '#E54545', '#C02FEB', '#722ED1', '#13C2C2', '#262626', '#595959', '#8C8C8C', '#BFBFBF'];
exports.colorList = colorList;
const batchOptionsElement = [{
  value: 0,
  label: '单文字'
}, {
  value: 1,
  label: '平铺'
}];
exports.batchOptionsElement = batchOptionsElement;
const opacityOptionsElement = [{
  value: 0.9,
  label: '不透明'
}, {
  value: 0.75,
  label: '25%透明'
}, {
  value: 0.5,
  label: '50%透明'
}, {
  value: 0.25,
  label: '75%透明'
}];
exports.opacityOptionsElement = opacityOptionsElement;
const degreeOptionsElement = [{
  value: 20,
  label: '20°'
}, {
  value: 30,
  label: '30°'
}, {
  value: 45,
  label: '45°'
}, {
  value: 60,
  label: '60°'
}];
exports.degreeOptionsElement = degreeOptionsElement;
const waterMarkOptions = {
  init(img) {
    img.crossOrigin = 'anonymous';
  }
};
exports.waterMarkOptions = waterMarkOptions;