"use client"; import { TextInput } from "@/components/ui/TextInput/TextInput"; import { MarkupPreview } from "@/components/ui/MarkupText/MarkupText"; import type { InfoScreenDefinition } from "@/lib/funnel/types"; import type { BuilderScreen } from "@/lib/admin/builder/types"; interface InfoScreenConfigProps { screen: BuilderScreen & { template: "info" }; onUpdate: (updates: Partial) => void; } export function InfoScreenConfig({ screen, onUpdate }: InfoScreenConfigProps) { const infoScreen = screen as InfoScreenDefinition & { position: { x: number; y: number } }; const handleDescriptionChange = (text: string) => { onUpdate({ description: text ? { ...(infoScreen.description ?? {}), text, } : undefined, }); }; const handleIconChange = >( field: T, value: NonNullable[T] | undefined ) => { const baseIcon = infoScreen.icon ?? { type: "emoji", value: "✨", size: "lg" }; if (field === "value") { if (!value) { onUpdate({ icon: undefined }); } else { onUpdate({ icon: { ...baseIcon, value } }); } return; } onUpdate({ icon: { ...baseIcon, [field]: value } }); }; return (

Информационный контент

{/* 🎨 ПРЕВЬЮ РАЗМЕТКИ */} {infoScreen.description?.text && ( )}

Иконка

); }