"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: {
      backgroundColor: '#2F54EB'
    },
    buttonText: {
      sizeType: 'Customize font styles',
      fontFamily: 'Open Sans',
      fontWeight: 400,
      fontSize: 14,
      fontStyle: 'normal',
      color: '#fff',
      padding: '10px 26px'
    },
    buttonBorder: {
      open: true,
      borderColor: '',
      borderRadius: 6
    },
    buttonIcon: {
      iconUrl: '',
      layout: 'right'
    },
    text: 'Button',
    hover: null
  };
};

var getDefaultJSON = function getDefaultJSON() {
  return {
    id: (0, _uuid.v4)(),
    type: 'BUTTON',
    content: {
      button: __assign({}, getDefaultMetaButtonJson()),
      secondaryButton: __assign(__assign({}, getDefaultMetaButtonJson()), {
        content: {
          backgroundColor: '#fff'
        },
        buttonText: {
          sizeType: 'Customize font styles',
          fontFamily: 'Open Sans',
          fontWeight: 400,
          fontSize: 14,
          fontStyle: 'normal',
          color: '#2F54EB',
          padding: '10px 26px'
        },
        buttonBorder: {
          open: true,
          borderColor: '#2F54EB',
          borderRadius: 6
        }
      })
    },
    customize: {
      layout: 'layout1',
      align: 'center'
    },
    background: {
      opacity: 100,
      color: '#F2F2F2',
      image: '',
      bgType: 'color'
    }
  };
};

exports.getDefaultJSON = getDefaultJSON;