"use strict";

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

var _uuid = require("uuid");

var recommendGroupSourceJSON = function recommendGroupSourceJSON(logo, text) {
  var groupId = (0, _uuid.v4)();
  return {
    id: groupId,
    image: {
      parentId: groupId,
      id: (0, _uuid.v4)(),
      open: true,
      type: 'IMAGE',
      content: {
        h5Name: '',
        pcName: '',
        h5ImgSrc: logo,
        pcImgSrc: logo,
        clickUrl: ''
      },
      hover: {
        open: false,
        backgroundType: 'enlarge',
        magnification: 1.5,
        pcImgHoverUrl: '',
        h5ImgHoverUrl: ''
      }
    },
    groupName: {
      parentId: groupId,
      id: (0, _uuid.v4)(),
      open: true,
      type: 'TEXT',
      specialContent: [],
      text: text,
      content: {
        fontFamily: 'Open Sans',
        fontWeight: 700,
        fontSize: 14,
        color: '#929292'
      },
      underline: {
        open: false,
        textDecorationColor: '',
        textDecorationStyle: 'solid'
      },
      vertical: {}
    },
    sourceType: 'recommend',
    hover: {
      open: true,
      image: {
        parentId: groupId,
        id: (0, _uuid.v4)(),
        open: false,
        type: 'IMAGE',
        content: {
          h5Name: '',
          pcName: '',
          h5ImgSrc: logo,
          pcImgSrc: logo,
          clickUrl: ''
        },
        hover: {
          open: false,
          backgroundType: 'enlarge',
          magnification: 1.5,
          pcImgHoverUrl: '',
          h5ImgHoverUrl: ''
        }
      },
      groupName: {
        parentId: groupId,
        id: (0, _uuid.v4)(),
        open: false,
        type: 'TEXT',
        specialContent: [],
        text: text,
        content: {
          fontFamily: 'Open Sans',
          fontWeight: 700,
          fontSize: 14,
          color: '#CE1126'
        },
        underline: {
          open: false,
          textDecorationColor: '',
          textDecorationStyle: 'solid'
        },
        vertical: {}
      }
    }
  };
};

exports.recommendGroupSourceJSON = recommendGroupSourceJSON;

var getDefaultJSON = function getDefaultJSON() {
  return {
    id: (0, _uuid.v4)(),
    type: 'RECOMMEND',
    groupSource: [recommendGroupSourceJSON('', 'Sale'), recommendGroupSourceJSON('', 'Popular')],
    content: {
      label: {
        id: (0, _uuid.v4)(),
        open: true,
        type: 'BUTTON',
        text: 'Button',
        content: {
          url: '',
          backgroundColor: '#0038A8'
        },
        buttonText: {
          fontFamily: 'Open Sans',
          fontWeight: 600,
          fontSize: 8,
          fontStyle: 'normal',
          color: '#fff',
          padding: '0 5px'
        },
        buttonBorder: {
          open: true,
          borderColor: '',
          borderRadius: 7
        },
        buttonIcon: {
          iconUrl: '',
          layout: 'right'
        },
        hover: null
      },
      productName: {
        id: (0, _uuid.v4)(),
        open: true,
        type: 'Text',
        specialContent: [],
        text: 'Flash Deal',
        content: {
          fontFamily: 'Open Sans',
          fontWeight: 500,
          fontSize: 14,
          color: '#2C2C2C'
        },
        underline: {
          open: false,
          textDecorationColor: '',
          textDecorationStyle: 'solid'
        },
        vertical: {
          open: false,
          lineHeight: 18
        }
      },
      activityPrice: {
        id: (0, _uuid.v4)(),
        open: true,
        type: 'Text',
        specialContent: [],
        text: 'Flash Deal',
        content: {
          fontFamily: 'Open Sans',
          fontWeight: 600,
          fontSize: 14,
          color: '#CE1126'
        },
        underline: {
          open: false,
          textDecorationColor: '',
          textDecorationStyle: 'solid'
        },
        vertical: {
          open: false,
          lineHeight: 18
        }
      },
      salesPrice: {
        id: (0, _uuid.v4)(),
        open: true,
        type: 'Text',
        specialContent: [],
        text: 'Flash Deal',
        content: {
          fontFamily: 'Open Sans',
          fontWeight: 500,
          fontSize: 10,
          color: '#929292'
        },
        underline: {
          open: false,
          textDecorationColor: '',
          textDecorationStyle: 'solid'
        },
        vertical: {
          open: false,
          lineHeight: 18
        }
      },
      salesProgressVisible: {
        open: true
      }
    },
    customize: {
      layout: 'left',
      align: 'left'
    },
    background: {
      opacity: 100,
      color: '#F2F2F2',
      image: '',
      bgType: 'color'
    }
  };
};

exports.getDefaultJSON = getDefaultJSON;