"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 {
    text: 'Title',
    content: {
      fontFamily: 'Montserrat',
      size: '',
      fontSize: 20,
      width: 0 // 文本区域宽度

    },
    specialContent: [],
    underline: {
      open: false,
      textDecorationColor: '#000',
      textDecorationStyle: 'solid'
    },
    vertical: {
      open: false,
      lineHeight: '' // 行间距

    }
  };
};

var getDefaultJSON = function getDefaultJSON() {
  return {
    id: (0, _uuid.v4)(),
    type: 'TEXT',
    setting: {
      layout: 'left',
      title: __assign({
        open: false,
        type: 'TEXT'
      }, getDefaultMetaTextJson()),
      subtitle: __assign({
        open: false,
        type: 'TEXT'
      }, getDefaultMetaTextJson()),
      button: {
        open: false,
        type: 'BUTTON',
        content: {
          url: ''
        },
        buttonText: {},
        buttonBorder: {},
        buttonIcon: {},
        hover: {}
      }
    },
    source: [{
      title: {
        type: 'TEXT'
      },
      content: {
        type: 'TEXT'
      }
    }],
    style: {
      align: 'left',
      backgroundColor: 'red',
      backgroundImage: '../image.png'
    }
  };
};

exports.getDefaultJSON = getDefaultJSON;