+ {/* Выбор экрана */}
+
+
+
+
+
+ {/* Оператор (только для list экранов с несколькими опциями) */}
+ {selectorType === "list" && conditionOptions.length > 1 && (
+
+
+
+
+ )}
+
+ {/* Zodiac Selector */}
+ {selectorType === "zodiac" && (
+
+
+
+
+ )}
+
+ {/* Email Domain Selector */}
+ {selectorType === "email" && (
+
+
+
+
+ )}
+
+ {/* Age Selector */}
+ {selectorType === "age" && (
+
+ )}
+
+ {/* Опции для обычных list экранов */}
+ {selectorType === "list" && (
+
+
+
+ {conditionOptions.map((opt) => (
+
+ ))}
+
+
+ )}
+
+ {/* Если тип экрана не поддерживается */}
+ {!selectorType && selectedScreen && (
+
+ ⚠️ Экран {selectedScreen.template} не поддерживает автоматический выбор значений.
+ Выберите другой экран (list, date с zodiac, age, email).
+
+ )}
+
+ );
+}
diff --git a/src/components/admin/builder/templates/VariablesConfig.tsx b/src/components/admin/builder/templates/VariablesConfig.tsx
new file mode 100644
index 0000000..7d1c65b
--- /dev/null
+++ b/src/components/admin/builder/templates/VariablesConfig.tsx
@@ -0,0 +1,297 @@
+"use client";
+
+import { useState } from "react";
+import { Plus, Trash2, ChevronDown, ChevronRight } from "lucide-react";
+import { TextInput } from "@/components/ui/TextInput/TextInput";
+import { VariableMappingConditionEditor } from "./VariableMappingConditionEditor";
+import type { VariableDefinition, VariableMapping, NavigationConditionDefinition } from "@/lib/funnel/types";
+import type { BuilderScreen } from "@/lib/admin/builder/types";
+
+interface VariablesConfigProps {
+ variables: VariableDefinition[] | undefined;
+ onUpdate: (variables: VariableDefinition[] | undefined) => void;
+ availableScreens: BuilderScreen[];
+}
+
+export function VariablesConfig({ variables = [], onUpdate, availableScreens }: VariablesConfigProps) {
+ const [expandedVariables, setExpandedVariables] = useState