"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.textGroupSourceJSON = 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
    }
  };
};

var textGroupSourceJSON = function textGroupSourceJSON() {
  var groupId = (0, _uuid.v4)();
  return {
    id: groupId,
    content: {
      title: __assign(__assign({}, getDefaultMetaTextJson()), {
        text: 'Group Name',
        content: {
          sizeType: 'Customize font styles',
          fontFamily: 'Open Sans',
          fontWeight: 600,
          fontSize: 26,
          width: '100%',
          color: '#232F46'
        }
      }),
      text: __assign(__assign({}, getDefaultMetaTextJson()), {
        text: 'For the text area, you can enter a subtitle or description, the default width is the same as title.',
        content: {
          sizeType: 'Body 1',
          fontFamily: 'Open Sans',
          fontWeight: 400,
          fontSize: 18,
          width: '100%',
          color: '#232F46'
        }
      })
    }
  };
};

exports.textGroupSourceJSON = textGroupSourceJSON;

var getDefaultJSON = function getDefaultJSON() {
  return {
    id: (0, _uuid.v4)(),
    type: 'TEXT',
    title: {
      headline: __assign(__assign({}, getDefaultMetaTextJson()), {
        text: 'Title use, click modify text.',
        content: {
          sizeType: 'Headline 1',
          fontFamily: 'Montserrat',
          fontWeight: 600,
          fontSize: 68,
          color: '#232F46'
        }
      }),
      subtitle: __assign(__assign({}, getDefaultMetaTextJson()), {
        text: 'For the text area, you can enter a subtitle or description',
        content: {
          sizeType: 'Title 1',
          fontFamily: 'Montserrat',
          fontWeight: 400,
          fontSize: 32,
          color: '#232F46'
        }
      })
    },
    groupSource: [textGroupSourceJSON(), textGroupSourceJSON(), textGroupSourceJSON()],
    customize: {
      layout: 'left',
      align: 'left',
      rowNum: 3
    },
    background: {
      opacity: 100,
      color: '#F2F2F2',
      image: '',
      bgType: 'color'
    }
  };
};

exports.getDefaultJSON = getDefaultJSON;