import { get, startCase, uniqueId } from "lodash"; import { ILayoutSettings, PageSectionCategory, } from "@sc/plugins/misc/v2/blocks/weblayouts/types"; import { ComponentTypes } from "@sc/plugins/webcomponents/v2/types"; import { BenefitLayouts } from "../types"; import { combineData, lorem } from "../../utils"; import { style } from "./style"; import { IconTypes } from "@sc/plugins/webcomponents/v2/Icon"; import { default as defaultData } from "./data.json"; import { getImagePlaceholder, ImagePlaceholderTypes, getVideoPlaceholder, VideoPlaceholderTypes, } from "../../Placeholders"; import theme from "../../theme"; const content = combineData(defaultData); const settings: ILayoutSettings = { label: BenefitLayouts.TWENTYONE, layout: BenefitLayouts.TWENTYONE, previewImage: "https://sandcastleassets.s3.amazonaws.com/blocks/benefits/Benefit21.png", default: { label: PageSectionCategory.BENEFIT, type: ComponentTypes.SECTION, bodyOnly: true, canHaveChildren: true, properties: { ...style.SECTION, ...style.SECTION_INNER, }, children: [ { type: ComponentTypes.COLUMNS, canHaveChildren: false, properties: { width: "100%", }, children: [ { type: ComponentTypes.COLUMN, canHaveChildren: true, preventDelete: true, md: parseInt((4 * 100) / 12), properties: { height: "100%", mobile: { desktop: { padding: 40, }, smartphone: { padding: 10, }, }, minHeight: 20, }, children: [ getImagePlaceholder({ type: ImagePlaceholderTypes.NONE, style: { height: "100%", }, }), ], }, { type: ComponentTypes.COLUMN, canHaveChildren: true, preventDelete: true, md: parseInt((8 * 100) / 12), properties: { height: "100%", mobile: { desktop: { padding: 40, }, smartphone: { padding: 10, }, }, minHeight: 20, }, children: [ { type: ComponentTypes.HEADLINE, canHaveChildren: false, properties: { ...style.HEADLINE, ...get(content, "main_headline.style", {}), }, html: "Featured Benefit", }, { type: ComponentTypes.TEXT, canHaveChildren: false, properties: { ...style.TEXT, ...get(content, "sub_headline.style", {}), }, html: lorem.generateParagraphs(1), }, { type: ComponentTypes.COLUMNS, canHaveChildren: false, properties: { width: "100%", }, children: [ { type: ComponentTypes.COLUMN, canHaveChildren: true, preventDelete: true, md: parseInt((6 * 100) / 12), properties: { height: "100%", padding: 0, minHeight: 20 }, children: [ { type: ComponentTypes.LIST, data: [ { caption: lorem.generateSentences(1), style: style.LISTITEM.style, iconStyle: style.LISTITEM.iconStyle, contentStyle: style.LISTITEM.contentStyle, icon: IconTypes.CheckCircleOutline, }, { caption: lorem.generateSentences(1), style: style.LISTITEM.style, iconStyle: style.LISTITEM.iconStyle, contentStyle: style.LISTITEM.contentStyle, icon: IconTypes.CheckCircleOutline, }, { caption: lorem.generateSentences(1), style: style.LISTITEM.style, iconStyle: style.LISTITEM.iconStyle, contentStyle: style.LISTITEM.contentStyle, icon: IconTypes.CheckCircleOutline, }, ], }, ], }, { type: ComponentTypes.COLUMN, canHaveChildren: true, preventDelete: true, md: parseInt((6 * 100) / 12), properties: { height: "100%", padding: 0, minHeight: 20 }, children: [ { type: ComponentTypes.LIST, data: [ { caption: lorem.generateSentences(1), style: style.LISTITEM.style, iconStyle: style.LISTITEM.iconStyle, contentStyle: style.LISTITEM.contentStyle, icon: IconTypes.CheckCircleOutline, }, { caption: lorem.generateSentences(1), style: style.LISTITEM.style, iconStyle: style.LISTITEM.iconStyle, contentStyle: style.LISTITEM.contentStyle, icon: IconTypes.CheckCircleOutline, }, { caption: lorem.generateSentences(1), style: style.LISTITEM.style, iconStyle: style.LISTITEM.iconStyle, contentStyle: style.LISTITEM.contentStyle, icon: IconTypes.CheckCircleOutline, }, ], }, ], }, ], }, ], }, ], }, ], }, }; export default settings;