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 { CTALayouts } from "@sc/plugins/misc/v2/blocks/weblayouts/CTA/types"; import { ContentLayouts } from "@sc/plugins/misc/v2/blocks/weblayouts/Content/types"; import { combineData, lorem } from "../../utils"; import { default as defaultData } from "./data.json"; import { style } from "./style"; import { getImagePlaceholder, ImagePlaceholderTypes, getVideoPlaceholder, VideoPlaceholderTypes, } from "../../Placeholders"; import theme from "../../theme"; const content = combineData(defaultData); const settings: ILayoutSettings = { label: CTALayouts.THIRTEEN, layout: CTALayouts.THIRTEEN, previewImage: "https://sandcastleassets.s3.amazonaws.com/blocks/cta/CTA13.png", default: { type: ComponentTypes.SECTION, label: PageSectionCategory.CTA, bodyOnly: true, canHaveChildren: false, 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: { maxHeight: 525, overflowY: "hidden", }, children: [ getImagePlaceholder({ type: ImagePlaceholderTypes.MOBILE05, style: { height: "100%", // backgroundColor: theme.foregroundColor, // maxWidth: 500, width: 500, mobile: { desktop: { width: 500 }, smartphone: { width: "100%" }, }, margin: "0 auto", }, }), ], }, ], }, { 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: { padding: 60, mobile: { desktop: { padding: 60 }, smartphone: { padding: 20 }, }, }, 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.COLUMNS, canHaveChildren: false, properties: style.BUTTON_CONTAINER, children: [ { type: ComponentTypes.COLUMN, canHaveChildren: true, preventDelete: true, md: parseInt((6 * 100) / 12), properties: { height: "100%", padding: 0, minHeight: 20, }, children: [ { type: ComponentTypes.BUTTON, canHaveChildren: false, properties: style.BUTTON.style, caption1: "Learn More", caption1style: style.BUTTON.caption1, }, ], }, { type: ComponentTypes.COLUMN, canHaveChildren: true, preventDelete: true, md: parseInt((6 * 100) / 12), properties: { height: "100%", padding: 0, minHeight: 20, }, children: [ { type: ComponentTypes.BUTTON, canHaveChildren: false, properties: { ...style.BUTTON.style, backgroundColor: "transparent", border: `1px solid ${theme.backgroundColor}`, }, caption1: "Free Access", caption1style: { ...style.BUTTON.caption1, color: theme.backgroundColor, }, }, ], }, ], }, ], }, ], }, ], }, ], }, }; export default settings;