"use client" import * as React from "react" import { ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, } from "@/examples/base/ui-rtl/context-menu" import { ArrowLeftIcon, ArrowRightIcon, RotateCwIcon } from "lucide-react" import { useTranslation, type Translations, } from "@/components/language-selector" const translations: Translations = { en: { dir: "ltr", values: { rightClick: "Right click here", longPress: "Long press here", navigation: "Navigation", back: "Back", forward: "Forward", reload: "Reload", moreTools: "More Tools", savePage: "Save Page...", createShortcut: "Create Shortcut...", nameWindow: "Name Window...", developerTools: "Developer Tools", delete: "Delete", showBookmarks: "Show Bookmarks", showFullUrls: "Show Full URLs", people: "People", pedro: "Pedro Duarte", colm: "Colm Tuite", }, }, ar: { dir: "rtl", values: { rightClick: "انقر بزر الماوس الأيمن هنا", longPress: "اضغط مطولاً هنا", navigation: "التنقل", back: "رجوع", forward: "تقدم", reload: "إعادة تحميل", moreTools: "المزيد من الأدوات", savePage: "حفظ الصفحة...", createShortcut: "إنشاء اختصار...", nameWindow: "تسمية النافذة...", developerTools: "أدوات المطور", delete: "حذف", showBookmarks: "إظهار الإشارات المرجعية", showFullUrls: "إظهار عناوين URL الكاملة", people: "الأشخاص", pedro: "Pedro Duarte", colm: "Colm Tuite", }, }, he: { dir: "rtl", values: { rightClick: "לחץ לחיצה ימנית כאן", longPress: "לחץ לחיצה ארוכה כאן", navigation: "ניווט", back: "חזור", forward: "קדימה", reload: "רענן", moreTools: "כלים נוספים", savePage: "שמור עמוד...", createShortcut: "צור קיצור דרך...", nameWindow: "שם חלון...", developerTools: "כלי מפתח", delete: "מחק", showBookmarks: "הצג סימניות", showFullUrls: "הצג כתובות URL מלאות", people: "אנשים", pedro: "Pedro Duarte", colm: "Colm Tuite", }, }, } export function ContextMenuRtl() { const { dir, t, language } = useTranslation(translations, "ar") const [people, setPeople] = React.useState("pedro") return ( {t.rightClick} {t.longPress} {t.navigation} {t.back} ⌘[ {t.forward} ⌘] {t.reload} ⌘R {t.moreTools} {t.savePage} {t.createShortcut} {t.nameWindow} {t.developerTools} {t.delete} {t.showBookmarks} {t.showFullUrls} {t.people} {t.pedro} {t.colm} ) }