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.TWO, layout: BenefitLayouts.TWO, previewImage: "https://sandcastleassets.s3.amazonaws.com/blocks/benefits/Benefit02.png", default: { type: ComponentTypes.SECTION, label: PageSectionCategory.BENEFIT, 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((6 * 100) / 12), properties: { height: "100%", padding: 0, minHeight: 20 }, children: [ { type: ComponentTypes.CONTAINER, canHaveChildren: true, properties: { mobile: { desktop: { padding: 110, }, smartphone: { padding: 40, }, }, backgroundColor: theme.backgroundColor, }, children: [ { type: ComponentTypes.HEADLINE, canHaveChildren: false, properties: { ...style.HEADLINE, ...get(content, "main_headline.style", {}), }, html: get(content, "main_headline.html", "..."), }, { type: ComponentTypes.TEXT, canHaveChildren: false, properties: { ...style.TEXT, ...get(content, "sub_headline.style", {}), }, html: get(content, "sub_headline.html", "..."), }, { type: ComponentTypes.CONTAINER, canHaveChildren: true, properties: { ...style.LIST, marginTop: 60, }, children: [ { type: ComponentTypes.LISTITEM, canHaveChildren: false, properties: { ...style.LI, color: theme.foregroundColor, }, iconStyle: { borderRadius: "100%", backgroundColor: theme.foregroundColor, padding: 10, color: theme.backgroundColor, }, contentStyle: { padding: 12, }, icon: IconTypes.Search, html: "A Proven Strategy", }, { type: ComponentTypes.LISTITEM, canHaveChildren: false, properties: { ...style.LI, color: theme.foregroundColor, }, iconStyle: { borderRadius: "100%", backgroundColor: theme.foregroundColor, padding: 10, color: theme.backgroundColor, }, contentStyle: { padding: 12, }, icon: IconTypes.Lock, html: "Free Download", }, ], }, ], }, ], }, { type: ComponentTypes.COLUMN, canHaveChildren: true, preventDelete: true, md: parseInt((6 * 100) / 12), properties: { height: "100%", padding: 0, minHeight: 20 }, children: [], }, ], }, ], }, }; export default settings;