"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getDefaultJSON = void 0;

var _uuid = require("uuid");

var __assign = void 0 && (void 0).__assign || function () {
  __assign = Object.assign || function (t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
      s = arguments[i];

      for (var p in s) {
        if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
      }
    }

    return t;
  };

  return __assign.apply(this, arguments);
};

/**
 * 获取 text 元组件json
 */
var getDefaultMetaTextJson = function getDefaultMetaTextJson() {
  return {
    id: (0, _uuid.v4)(),
    open: true,
    type: 'Text',
    specialContent: [],
    text: 'Flash Deal',
    content: {
      sizeType: 'Customize font styles',
      fontFamily: 'Open Sans',
      fontWeight: 600,
      fontSize: 14,
      color: '#CE1126'
    },
    underline: {
      open: false,
      textDecorationColor: '',
      textDecorationStyle: 'solid'
    },
    vertical: {
      open: false,
      lineHeight: 18
    }
  };
};
/**
 * 获取 text 元组件json
 */


var getDefaultMetaButtonJson = function getDefaultMetaButtonJson() {
  return {
    id: (0, _uuid.v4)(),
    open: true,
    content: {
      url: '',
      backgroundColor: '#2F54EB'
    },
    buttonText: {
      sizeType: 'Customize font styles',
      fontFamily: 'Open Sans',
      fontWeight: 600,
      fontSize: 14,
      fontStyle: 'normal',
      color: '#fff'
    },
    buttonBorder: {
      open: false,
      borderColor: '',
      borderRadius: 0
    },
    buttonIcon: {
      iconUrl: '',
      layout: 'right'
    },
    text: 'Button',
    hover: null
  };
};

var getDefaultJSON = function getDefaultJSON() {
  return {
    id: (0, _uuid.v4)(),
    type: 'NEWSLETTER',
    content: {
      inputField: {
        open: true,
        type: 'InputField',
        placeholder: 'Email Address',
        content: {
          sizeType: 'Customize font styles',
          fontFamily: 'Open Sans',
          fontWeight: 600,
          fontSize: 14,
          color: '#CE1126'
        }
      },
      button: __assign({}, getDefaultMetaButtonJson()),
      confirmation: __assign({}, getDefaultMetaTextJson())
    },
    customize: {
      layout: 'layout1',
      align: 'center'
    },
    background: {
      opacity: 100,
      color: '#fff',
      image: '',
      bgType: 'color'
    }
  };
};

exports.getDefaultJSON = getDefaultJSON;