"use client"; import type { Block, SectionBlockProps, TextBlockProps } from "@/features/editor/state/editorStore"; export function createFooterTemplateBlocks(opts: { sectionId: string; createId: () => string; }): { blocks: Block[]; lastSelectedId: string } { const { sectionId, createId } = opts; const columns: SectionBlockProps["columns"] = [ { id: `${sectionId}_col_1`, span: 12 }, ]; const sectionProps: SectionBlockProps = { background: "muted", paddingY: "md", // 푸터는 상대적으로 낮은 높이와 좁은 최대 폭을 사용한다. paddingYPx: 40, maxWidthPx: 800, backgroundColorCustom: "#020617", columns, } as any; const sectionBlock: Block = { id: sectionId, type: "section", props: sectionProps, sectionId: null, columnId: null, }; const firstColumnId = `${sectionId}_col_1`; const linksId = createId(); const linksProps: TextBlockProps = { text: "이용약관 · 개인정보처리방침", align: "center", size: "sm", } as any; const linksBlock: Block = { id: linksId, type: "text", props: linksProps, sectionId, columnId: firstColumnId, }; const copyrightId = createId(); const copyrightProps: TextBlockProps = { text: "© 2025 MyLanding. All rights reserved.", align: "center", size: "sm", } as any; const copyrightBlock: Block = { id: copyrightId, type: "text", props: copyrightProps, sectionId, columnId: firstColumnId, }; const blocks: Block[] = [sectionBlock, linksBlock, copyrightBlock]; const lastSelectedId = copyrightId; return { blocks, lastSelectedId }; }