"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 getDefaultMetaButtonJson = function getDefaultMetaButtonJson() {
  return {
    id: (0, _uuid.v4)(),
    open: true,
    content: {
      url: '',
      backgroundColor: '#e6eaf0'
    },
    buttonText: {
      sizeType: 'Customize font styles',
      fontFamily: 'Open Sans',
      fontWeight: 600,
      fontSize: 12,
      fontStyle: 'normal',
      color: '#8493AF',
      padding: '2px 8px'
    },
    buttonBorder: {
      open: true,
      borderColor: '',
      borderRadius: 4
    },
    buttonIcon: {
      iconUrl: '',
      layout: 'right'
    },
    text: 'Button Tag',
    hover: null
  };
};

var getDefaultJSON = function getDefaultJSON() {
  return {
    id: (0, _uuid.v4)(),
    type: 'TAG',
    content: {
      image: {
        open: false,
        type: 'IMAGE',
        content: {
          h5Name: '',
          pcName: '',
          h5ImgSrc: '',
          pcImgSrc: '',
          clickUrl: ''
        },
        hover: {
          open: false,
          backgroundType: 'enlarge',
          magnification: 1.5,
          pcImgHoverUrl: '',
          h5ImgHoverUrl: ''
        }
      },
      button: __assign({}, getDefaultMetaButtonJson()),
      secondaryButton: __assign({}, getDefaultMetaButtonJson())
    },
    customize: {
      layout: 'layout1',
      align: 'center'
    },
    background: {
      opacity: 100,
      color: '#F2F2F2',
      image: '',
      bgType: 'color'
    }
  };
};

exports.getDefaultJSON = getDefaultJSON;