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 { 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"; import { CTALayouts } from "../types"; const content = combineData(defaultData); const settings: ILayoutSettings = { label: CTALayouts.TWO, layout: CTALayouts.TWO, previewImage: "https://sandcastleassets.s3.amazonaws.com/blocks/cta/CTA02.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: 50, properties: { height: "100%", padding: 0, minHeight: 20 }, children: [ { type: ComponentTypes.CONTAINER, canHaveChildren: true, properties: { padding: 30, }, children: [ { type: ComponentTypes.HEADLINE, canHaveChildren: false, properties: { ...style.HEADLINE, ...get(content, "main_headline.style", {}), }, html: get(content, "main_headline.html", "..."), }, ], }, ], }, { type: ComponentTypes.COLUMN, canHaveChildren: true, preventDelete: true, md: 50, properties: { height: "100%", padding: 0, minHeight: 20 }, children: [ { type: ComponentTypes.CONTAINER, canHaveChildren: true, properties: { mobile: { desktop: { padding: 45, }, smartphone: { padding: 15, }, }, }, children: [ { type: ComponentTypes.COLUMNS, canHaveChildren: false, properties: { width: "100%", }, children: [ { type: ComponentTypes.COLUMN, canHaveChildren: true, preventDelete: true, md: parseInt((8 * 100) / 12), properties: { height: "100%", padding: 3, minHeight: 20, }, children: [ { type: ComponentTypes.FORMFIELD, canHaveChildren: false, styles: { containerStyle: style.FORM_FIELD.style, inputStyle: style.FORM_FIELD.inputStyle, }, placeholder: "Enter Your Email", name: "email", fieldType: "Text", }, ], }, { type: ComponentTypes.COLUMN, canHaveChildren: true, preventDelete: true, md: parseInt((4 * 100) / 12), properties: { height: "100%", padding: 3, minHeight: 20, }, children: [ { type: ComponentTypes.BUTTON, canHaveChildren: false, properties: style.BUTTON.style, caption1: "Get Started", caption1style: style.BUTTON.caption1, }, ], }, ], }, ], }, ], }, ], }, ], }, }; export default settings;