diff --git a/apps/admin/src/pages/MenuManagerPage.tsx b/apps/admin/src/pages/MenuManagerPage.tsx
index 3a08a69..9666022 100644
--- a/apps/admin/src/pages/MenuManagerPage.tsx
+++ b/apps/admin/src/pages/MenuManagerPage.tsx
@@ -1,26 +1,123 @@
import { useState, useEffect } from 'react'
import { API_BASE, type Menu } from '@homaroma/types'
-import { Save, Loader2, Plus, Trash2, GripVertical } from 'lucide-react'
+import { Save, Loader2, Plus, Trash2, GripVertical, Copy, Check } from 'lucide-react'
+
+const TreeNodeEditor = ({ node, type, depth, onChange, onRemove }: any) => {
+ const childrenKey = type === 'root' ? 'columns' : 'links';
+ const labelKey = type === 'column' ? 'title' : 'label';
+ const hasUrl = type !== 'column';
+
+ const children = node[childrenKey] || [];
+
+ const handleAddChild = () => {
+ const newChildType = type === 'root' ? 'column' : 'link';
+ const newChild = newChildType === 'column'
+ ? { title: { en: 'New Column' }, links: [] }
+ : { label: { en: 'New Link' }, url: '/', links: [] };
+ onChange({ ...node, [childrenKey]: [...children, newChild] });
+ };
+
+ const handleUpdateChild = (idx: number, newChild: any) => {
+ const newChildren = [...children];
+ newChildren[idx] = newChild;
+ onChange({ ...node, [childrenKey]: newChildren });
+ };
+
+ const handleRemoveChild = (idx: number) => {
+ onChange({ ...node, [childrenKey]: children.filter((_: any, i: number) => i !== idx) });
+ };
+
+ const languages = ['th', 'en', 'ja', 'zh', 'vi', 'ko'];
+ const nodeLabel = node[labelKey] || {};
+
+ return (
+
0 ? 'ml-6 border-l-cyan-500/30' : ''}`}>
+
+
+
+
+
+ {languages.map(lang => (
+
+ {lang}
+ onChange({ ...node, [labelKey]: { ...nodeLabel, [lang]: e.target.value } })}
+ />
+
+ ))}
+
+
+
+ {hasUrl && (
+
+
+ onChange({ ...node, url: e.target.value })}
+ />
+
+ )}
+
+
+
+
+
+
+ {children.length > 0 && (
+
+ {children.map((child: any, i: number) => (
+ handleUpdateChild(i, newChild)}
+ onRemove={() => handleRemoveChild(i)}
+ />
+ ))}
+
+ )}
+
+ );
+}
+
export default function MenuManagerPage() {
const [loading, setLoading] = useState(true)
const [saving, setSaving] = useState(false)
const [menus, setMenus] = useState