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 { CountDownTypes } from "@sc/plugins/webcomponents/v2/Countdown/types"; import { UrgencyLayouts } from "../types"; const content = combineData(defaultData); const settings: ILayoutSettings = { label: UrgencyLayouts.THREE, layout: UrgencyLayouts.THREE, previewImage: "https://sandcastleassets.s3.amazonaws.com/blocks/urgency/Urgency03.png", default: { type: ComponentTypes.SECTION, label: PageSectionCategory.URGENCY, 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((8 * 100) / 12), properties: { height: "100%", padding: 0, minHeight: 20 }, children: [ { type: ComponentTypes.PICTURE, canHaveChildren: false, properties: { width: 250, mobile: { desktop: { width: 250 }, smartphone: { width: "100%" }, }, }, src: theme.logoDark, }, ], }, { type: ComponentTypes.COLUMN, canHaveChildren: true, preventDelete: true, md: parseInt((4 * 100) / 12), properties: { height: "100%", padding: 0, minHeight: 20 }, children: [ { type: ComponentTypes.CONTAINER, canHaveChildren: true, properties: { padding: 5, backgroundColor: theme.foregroundColor, }, children: [ { type: ComponentTypes.TEXT, canHaveChildren: false, properties: { ...style.TEXT, ...get(content, "sub_headline.style", {}), }, html: `Get Your ${startCase( lorem.generateWords(2) )} HALF-PRICE until 12am PST`, }, ], }, ], }, ], }, ], }, }; export default settings;