import { useState, useEffect } from 'react';
import {
AlertTriangle, Send, Loader, CheckCircle
} from 'lucide-react';
export default function Admin({ token, isArabic }) {
const [activeTab, setActiveTab] = useState('users');
const [users, setUsers] = useState([]);
const [subscriptions, setSubscriptions] = useState([]);
const [systemStats, setSystemStats] = useState(null);
const [rules, setRules] = useState({ pending: [], global: [] });
const [complaints, setComplaints] = useState([]);
const [feedback, setFeedback] = useState({ summary: [], items: [] });
const [inquiries, setInquiries] = useState([]);
const [reviewsList, setReviewsList] = useState([]);
// Chat state
const [chatInput, setChatInput] = useState('');
const [chatHistory, setChatHistory] = useState([
{
role: 'assistant',
content: isArabic
? 'أهلاً بك يا منشئ المنصة! 👑\n\nأنا **المدير التنفيذي ومشرف العمليات (AI Operations Director)** للمنصة بالكامل. أملك صلاحية مباشرة على قاعدة البيانات والمبيعات والدعم الفني وأسعار السوق — اختر أمراً سريعاً أدناه أو اكتب ما تريد تنفيذه.'
: 'Welcome Founder! 👑\n\nI am the **AI Operations Director & Platform Supervisor**. I have live operational tools over users, real MRR revenue, per-tool subscriptions & credits, complaints, feedback, live UAE market prices, and system health. Pick a quick command below or ask directly.'
}
]);
const [chatLoading, setChatLoading] = useState(false);
const [loading, setLoading] = useState(false);
const [refreshTick, setRefreshTick] = useState(0);
const fetchData = () => setRefreshTick((n) => n + 1);
useEffect(() => {
let active = true;
(async () => {
await Promise.resolve();
if (!active) return;
setLoading(true);
try {
if (activeTab === 'users') {
const res = await fetch('/api/admin/users', {
headers: { 'Authorization': `Bearer ${token}` }
});
if (active && res.ok) setUsers(await res.json());
} else if (activeTab === 'subscriptions') {
const res = await fetch('/api/admin/subscriptions', {
headers: { 'Authorization': `Bearer ${token}` }
});
if (active && res.ok) setSubscriptions(await res.json());
} else if (activeTab === 'system') {
const res = await fetch('/api/admin/stats', {
headers: { 'Authorization': `Bearer ${token}` }
});
if (active && res.ok) setSystemStats(await res.json());
} else if (activeTab === 'rules') {
const res = await fetch('/api/admin/memory-rules', {
headers: { 'Authorization': `Bearer ${token}` }
});
if (active && res.ok) setRules(await res.json());
} else if (activeTab === 'complaints') {
const res = await fetch('/api/admin/complaints', {
headers: { 'Authorization': `Bearer ${token}` }
});
if (active && res.ok) setComplaints(await res.json());
} else if (activeTab === 'feedback') {
const res = await fetch('/api/admin/feedback', {
headers: { 'Authorization': `Bearer ${token}` }
});
if (active && res.ok) setFeedback(await res.json());
} else if (activeTab === 'inquiries') {
const res = await fetch('/api/admin/inquiries', {
headers: { 'Authorization': `Bearer ${token}` }
});
if (active && res.ok) setInquiries(await res.json());
} else if (activeTab === 'reviews') {
const res = await fetch('/api/admin/reviews', {
headers: { 'Authorization': `Bearer ${token}` }
});
if (active && res.ok) setReviewsList(await res.json());
}
} catch (err) {
console.error('Admin fetch error:', err);
} finally {
if (active) setLoading(false);
}
})();
return () => { active = false; };
}, [activeTab, token, refreshTick]);
const handleApproveRule = async (ruleId) => {
try {
const res = await fetch('/api/admin/memory-rules/approve', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({ rule_id: ruleId })
});
if (res.ok) {
fetchData();
}
} catch (err) {
console.error(err);
}
};
const handleRejectRule = async (ruleId) => {
try {
const res = await fetch('/api/admin/memory-rules/reject', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({ rule_id: ruleId })
});
if (res.ok) {
fetchData();
}
} catch (err) {
console.error(err);
}
};
const handleResolveComplaint = async (complaintId) => {
try {
const res = await fetch('/api/admin/complaints/resolve', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({ complaint_id: complaintId })
});
if (res.ok) {
fetchData();
}
} catch (err) {
console.error(err);
}
};
const handleUpdateInquiryStatus = async (inquiryId, status) => {
try {
const res = await fetch('/api/admin/inquiries/status', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({ inquiry_id: inquiryId, status })
});
if (res.ok) {
fetchData();
}
} catch (err) {
console.error(err);
}
};
const handleToggleReviewApprove = async (reviewId, isApproved) => {
try {
const res = await fetch('/api/admin/reviews/toggle-approve', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({ review_id: reviewId, is_approved: isApproved ? 0 : 1 })
});
if (res.ok) {
fetchData();
}
} catch (err) {
console.error(err);
}
};
const handleToggleReviewFeature = async (reviewId, isFeatured) => {
try {
const res = await fetch('/api/admin/reviews/toggle-feature', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({ review_id: reviewId, is_featured: isFeatured ? 0 : 1 })
});
if (res.ok) {
fetchData();
}
} catch (err) {
console.error(err);
}
};
const handleDeleteReview = async (reviewId) => {
if (!window.confirm(isArabic ? 'هل أنت متأكد من حذف هذه المراجعة؟' : 'Are you sure you want to delete this review?')) return;
try {
const res = await fetch('/api/admin/reviews/delete', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({ review_id: reviewId })
});
if (res.ok) {
fetchData();
}
} catch (err) {
console.error(err);
}
};
const sendAdminPrompt = async (promptText) => {
const clean = (promptText ?? chatInput).trim();
if (!clean || chatLoading) return;
const userMsg = { role: 'user', content: clean };
setChatHistory(prev => [...prev, userMsg]);
if (promptText === undefined) setChatInput('');
setChatLoading(true);
try {
const res = await fetch('/api/admin/chat', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({ prompt: clean })
});
const data = await res.json();
if (res.ok) {
setChatHistory(prev => [...prev, { role: 'assistant', content: data.reply, action_result: data.action_result }]);
} else {
setChatHistory(prev => [...prev, { role: 'assistant', content: data.detail || 'Error communicating with AI Operations Director.' }]);
}
} catch {
setChatHistory(prev => [...prev, { role: 'assistant', content: 'Connection failed.' }]);
} finally {
setChatLoading(false);
}
};
const handleSendChat = async (e) => {
e.preventDefault();
await sendAdminPrompt();
};
return (
{/* Title */}
{isArabic ? 'لوحة تحكم المسؤول 👑' : 'Founder Admin Dashboard 👑'}
{isArabic ? 'إدارة المستخدمين والاشتراكات وصحة النظام وعمليات الصيانة بالكامل.' : 'Oversee users, subscriptions, system health, and global rules.'}
{/* Tabs list */}
{[
{ id: 'users', label: isArabic ? '👥 المستخدمين' : '👥 Users' },
{ id: 'subscriptions', label: isArabic ? '💳 الاشتراكات' : '💳 Subscriptions' },
{ id: 'system', label: isArabic ? '⚙️ حالة النظام' : '⚙️ System Health' },
{ id: 'chat', label: isArabic ? '🤖 AI Manager' : '🤖 AI Manager' },
{ id: 'rules', label: isArabic ? '🧠 قواعد التعلم' : '🧠 AI Learning' },
{ id: 'complaints', label: isArabic ? '🚨 شكاوى العملاء' : '🚨 Complaints' },
{ id: 'feedback', label: isArabic ? '⭐ تقييمات الأدوات' : '⭐ Tool Feedback' },
{ id: 'inquiries', label: isArabic ? '📩 الاستفسارات' : '📩 Inquiries' },
{ id: 'reviews', label: isArabic ? '🌟 إدارة المراجعات' : '🌟 Reviews Moderation' }
].map(tab => (
setActiveTab(tab.id)}
style={{
padding: '10px 18px',
fontSize: '0.92rem',
fontWeight: activeTab === tab.id ? 700 : 500,
background: activeTab === tab.id ? 'var(--primary-glow)' : 'transparent',
color: activeTab === tab.id ? 'var(--primary)' : 'var(--text-secondary)',
border: 'none',
borderBottom: activeTab === tab.id ? '2px solid var(--primary)' : '2px solid transparent',
cursor: 'pointer',
whiteSpace: 'nowrap',
transition: 'all 0.2s ease'
}}
>
{tab.label}
))}
{/* Content */}
{loading ? (
{isArabic ? 'جاري تحميل البيانات...' : 'Loading data...'}
) : (
<>
{/* 1. USERS TAB */}
{activeTab === 'users' && (
{isArabic ? 'المستخدمون المسجلون' : 'Registered Platform Users'}
ID
{isArabic ? 'البريد الإلكتروني' : 'Email Address'}
{isArabic ? 'الصلاحية' : 'Role'}
{isArabic ? 'تاريخ التسجيل' : 'Registered At'}
{users.map(u => (
{u.id}
{u.email}
{u.role}
{new Date(u.created_at).toLocaleString()}
))}
)}
{/* 2. SUBSCRIPTIONS TAB */}
{activeTab === 'subscriptions' && (
{isArabic ? 'الاشتراكات الفعالة' : 'Active Billing Subscriptions'}
User Email
Tool
Tier
Provider
Status
Projects
AI Calls
Exports
End Date
{subscriptions.map(s => (
{s.user_email}
{s.feature === 'programme' ? 'Work Programme' : s.feature === 'cashflow' ? 'Cash Flow' : 'QTO'}
Tier {s.plan_tier}
{s.provider}
{s.status}
{s.projects_used}
{s.ai_calls_used}
{s.exports_used}
{s.current_period_end ? new Date(s.current_period_end).toLocaleDateString() : 'N/A'}
))}
)}
{/* 3. SYSTEM HEALTH TAB */}
{activeTab === 'system' && systemStats && (
{systemStats.system_perfect ? (
{isArabic ? 'حالة النظام: مثالية ومكتملة' : 'System Health: PERFECT'}
) : (
{isArabic ? 'حالة النظام: تتطلب بعض التهيئة' : 'System Health: gaps detected'}
)}
{systemStats.analytics && (
📊 {isArabic ? 'إحصائيات النشاط والزوار' : 'Live Activity & Visitor Analytics'}
{isArabic ? 'إجمالي الزوار (24س)' : 'Total Visitors (24h)'}
{systemStats.analytics.visitors_24h ?? 0}
{isArabic ? 'زوار فريدين (IPs)' : 'Unique Visitor IPs'}
{systemStats.analytics.unique_visitors_24h ?? 0}
{isArabic ? 'تسجيلات الدخول اليوم' : 'Logins Today'}
{systemStats.analytics.logins_today}
{isArabic ? 'المستخدمين الجدد اليوم' : 'New Registrations Today'}
{systemStats.analytics.regs_today}
{isArabic ? 'مشاريع آخر 12 ساعة' : 'Projects Last 12h'}
{systemStats.analytics.projects_12h}
{isArabic ? 'أحدث المشاريع المعالجة' : 'Recent Projects'}
{systemStats.analytics.recent_projects && systemStats.analytics.recent_projects.length > 0 ? (
ID
{isArabic ? 'المستخدم' : 'User'}
{isArabic ? 'المشروع' : 'Project'}
{isArabic ? 'الحالة' : 'Status'}
{isArabic ? 'تاريخ الإنشاء' : 'Created At'}
{systemStats.analytics.recent_projects.map(p => (
#{p.id}
{p.user_email}
{p.name}
{p.status}
{new Date(p.created_at).toLocaleString()}
))}
) : (
{isArabic ? 'لا توجد مشاريع حديثة.' : 'No recent projects.'}
)}
)}
🔑 {isArabic ? 'المتغيرات البيئية' : 'Environment Settings'}
{Object.entries(systemStats.env_status).map(([env, configured]) => (
{env}
{configured ? (isArabic ? '🟢 مهيأ' : 'Configured') : (isArabic ? '🔴 مفقود' : 'Missing')}
))}
🔌 {isArabic ? 'اتصال المحركات وقواعد البيانات' : 'Core Integration Pings'}
Database Connectivity (TiDB Cloud)
{systemStats.db_ok ? '🟢 Success' : `🔴 Failed (${systemStats.db_error})`}
EasyOCR Fallback Local Engine
{systemStats.ocr_ready ? '🟢 Ready' : '🔴 Missing'}
PyMuPDF Blueprint Renderer
{systemStats.pdf_ready ? '🟢 Ready' : '🔴 Missing'}
💾 {isArabic ? 'طبقة التخزين المؤقت للمخططات' : 'Storage & Caching Layer'}
Cache Folder Status
{systemStats.cache.exists ? 'Created' : 'Not Found'}
Cached Blueprint extractions
{systemStats.cache.count} files
Disk Storage Utilized
{systemStats.cache.size_mb} MB
)}
{/* 4. AI OPERATIONS DIRECTOR CHAT TAB */}
{activeTab === 'chat' && (
{(isArabic ? [
{ label: '📊 التقرير التنفيذي والإيرادات الحقيقية', q: 'أعطني التقرير التنفيذي الكامل والإيرادات الشهرية الحقيقية لكل أداة وحركة الزوار.' },
{ label: '🚨 شكاوى الدعم المفتوحة', q: 'اعرض لي جميع شكاوى وتذاكر خدمة العملاء المفتوحة حالياً.' },
{ label: '⭐ تقييمات الأدوات الـ 3', q: 'اعرض ملخص تقييمات المستخدمين لأدوات المنصة الثلاث.' },
{ label: '📈 تحديث أسعار السوق الحي الآن', q: 'قم بتحديث أسعار السوق الإماراتي الآن عبر البحث الحي.' },
{ label: '⚙️ فحص صحة النظام ومفاتيح API', q: 'افحص صحة السيرفر وقاعدة البيانات وحالة جميع مفاتيح Gemini الـ 20.' },
{ label: '📁 أحدث مشاريع المنصة', q: 'اعرض أحدث المشاريع المنجزة عبر الأدوات الثلاث.' },
] : [
{ label: '📊 Executive Briefing & Real MRR', q: 'Give me the live executive dashboard with real MRR breakdown per tool, users, projects & visitors.' },
{ label: '🚨 Open Support Tickets', q: 'List all open customer support complaints right now.' },
{ label: '⭐ Tool Feedback Summary', q: 'Show me the tool feedback ratings and recent user comments.' },
{ label: '📈 Sync Live UAE Market Prices', q: 'Trigger a live Google Search sync of UAE market prices now.' },
{ label: '⚙️ System & 20-Key Pool Health', q: 'Run a live system health check including database, cache, and all 20 Gemini API keys.' },
{ label: '📁 Recent Projects (All 3 Tools)', q: 'List the latest projects across QTO, Work Programme, and Cash Flow.' },
]).map((cmd, idx) => (
sendAdminPrompt(cmd.q)}
style={{
padding: '6px 12px', fontSize: '0.78rem', borderRadius: '18px',
border: '1px solid var(--border-color)', background: 'var(--bg-primary)',
color: 'var(--text-primary)', cursor: 'pointer',
}}
>
{cmd.label}
))}
{chatHistory.map((msg, idx) => (
{msg.role === 'user' ? (isArabic ? 'المؤسس' : 'Founder') : (isArabic ? 'المدير التنفيذي الذكي' : 'AI Operations Director')}
{msg.content}
{msg.action_result && (
{msg.action_result.success ? '✓ Live Operation Executed:' : '⚠️ Operation Notice:'}
{msg.action_result.message}
{msg.action_result.data && (
{JSON.stringify(msg.action_result.data, null, 2)}
)}
)}
))}
{chatLoading && (
{isArabic ? 'المدير التنفيذي ينفّذ الأمر على النظام...' : 'AI Operations Director executing live operation...'}
)}
)}
{/* 5. GLOBAL LEARNING TAB */}
{activeTab === 'rules' && (
🧠 {isArabic ? 'مراجعة وتأكيد قواعد التعلم التلقائي' : 'Global AI Learning Queue'}
{isArabic
? 'هنا يتم استعراض الكلمات الجمركية الجديدة وقواعد الربط المكتشفة من المستخدمين. اعتمادها يعممها كقواعد حصر عامة.'
: 'Approve or reject mapping requests submitted by users. Approved mappings apply globally.'}
⏳ {isArabic ? 'القواعد المعلقة للمراجعة' : 'Pending Approvals'} ({rules.pending.length})
{rules.pending.length === 0 ? (
{isArabic ? 'قائمة القواعد المعلقة فارغة.' : 'No pending rules to review.'}
) : (
rules.pending.map(r => (
User {r.user_id} mapped:
"{r.original_text}" ➔ {r.mapped_category}
handleApproveRule(r.id)} className="btn btn-primary" style={{ padding: '6px 12px', fontSize: '0.82rem' }}>
{isArabic ? 'موافقة وتعميم' : 'Approve Global'}
handleRejectRule(r.id)} className="btn btn-secondary" style={{ padding: '6px 12px', fontSize: '0.82rem', color: 'var(--error)', borderColor: 'rgba(239, 68, 68, 0.2)' }}>
{isArabic ? 'رفض' : 'Reject'}
))
)}
✅ {isArabic ? 'القواعد العالمية النشطة' : 'Active Global Mapping Rules'} ({rules.global.length})
Original Phrase
Mapped Category
Date Created
{rules.global.map(gr => (
"{gr.original_text}"
{gr.mapped_category}
{new Date(gr.created_at).toLocaleDateString()}
))}
)}
{/* 6. CUSTOMER COMPLAINTS TAB */}
{activeTab === 'complaints' && (
🚨 {isArabic ? 'صندوق شكاوى العملاء' : 'Customer Support Escalated Complaints'}
{complaints.length === 0 ? (
{isArabic ? 'لا توجد أي شكاوى معلقة.' : 'No customer complaints recorded.'}
) : (
complaints.map(c => (
User: {c.user_email}
{new Date(c.created_at).toLocaleString()}
{c.status}
{c.complaint_text}
{c.status === 'open' && (
handleResolveComplaint(c.id)} className="btn btn-primary" style={{ padding: '6px 14px', fontSize: '0.82rem' }}>
{isArabic ? 'تعليم كتم الحل بنجاح' : 'Mark Resolved'}
)}
))
)}
)}
{/* 7. TOOL FEEDBACK TAB */}
{activeTab === 'feedback' && (
⭐ {isArabic ? 'تقييمات المستخدمين لكل أداة' : 'User Ratings per Tool'}
{/* Per-tool summary cards */}
{feedback.summary && feedback.summary.length > 0 ? (
{feedback.summary.map(s => (
{s.tool_name}
{Number(s.avg_rating).toFixed(2)}
★
({s.total} {isArabic ? 'تقييم' : 'ratings'})
👍 {s.positive}
👎 {s.negative}
))}
) : (
{isArabic ? 'لا توجد تقييمات بعد.' : 'No feedback recorded yet.'}
)}
{/* Individual feedback list */}
{feedback.items && feedback.items.length > 0 && (
<>
{isArabic ? 'كل التقييمات' : 'All Feedback'}
{feedback.items.map(f => (
= 4 ? '4px solid var(--success)' : '4px solid var(--error)'
}}>
{'★'.repeat(f.rating)}{'☆'.repeat(5 - f.rating)}
{f.tool_name}
{f.project_name}
{f.created_at ? new Date(f.created_at).toLocaleString() : ''}
{f.reason && (
{f.reason}
)}
{f.user_email || (isArabic ? 'مستخدم محذوف' : 'deleted user')}
))}
>
)}
)}
{/* 8. INQUIRIES TAB */}
{activeTab === 'inquiries' && (
📩 {isArabic ? 'صندوق الاستفسارات ورسائل الدعم' : 'Inquiries & Support Messages'}
{inquiries.length === 0 ? (
{isArabic ? 'لا توجد أي استفسارات واردة حالياً.' : 'No customer inquiries recorded yet.'}
) : (
{inquiries.map(inq => (
{inq.name ? `${inq.name} (${inq.email})` : inq.email}
{inq.category}
{new Date(inq.created_at).toLocaleString()}
{inq.status}
{isArabic ? 'الموضوع: ' : 'Subject: '}{inq.subject}
{inq.message}
{inq.status !== 'resolved' && (
handleUpdateInquiryStatus(inq.id, 'resolved')}
className="btn btn-primary"
style={{ padding: '6px 14px', fontSize: '0.82rem', background: 'var(--success)' }}
>
{isArabic ? '✓ تم الرد والحل' : '✓ Mark Resolved'}
)}
{inq.status === 'new' && (
handleUpdateInquiryStatus(inq.id, 'in_progress')}
className="btn btn-secondary"
style={{ padding: '6px 14px', fontSize: '0.82rem' }}
>
{isArabic ? '⏳ قيد المعالجة' : '⏳ In Progress'}
)}
{inq.status === 'resolved' && (
handleUpdateInquiryStatus(inq.id, 'new')}
className="btn btn-secondary"
style={{ padding: '6px 14px', fontSize: '0.82rem' }}
>
{isArabic ? 'إعادة فتح' : 'Re-open'}
)}
✉️ {isArabic ? 'إرسال رد عبر الإيميل' : 'Reply via Email'}
))}
)}
)}
{/* 9. REVIEWS MODERATION TAB */}
{activeTab === 'reviews' && (
🌟 {isArabic ? 'إدارة واعتماد مراجعات المستخدمين' : 'Reviews & Testimonials Moderation'}
{isArabic
? '⚠️ المراجعات الجديدة تتطلب موافقة الأدمن لتظهر على الموقع للعامة'
: '⚠️ New reviews require admin approval before appearing publicly'}
{reviewsList.length === 0 ? (
{isArabic ? 'لا توجد أي مراجعات مسجلة.' : 'No reviews recorded.'}
) : (
{reviewsList.map(r => (
{'★'.repeat(r.rating)}{'☆'.repeat(5 - r.rating)}
{r.user_name}
{(r.user_role || r.company) && (
({[r.user_role, r.company].filter(Boolean).join(' • ')})
)}
{r.is_approved === 1
? (isArabic ? '✓ معتمد ومنشور' : '✓ Approved & Public')
: (isArabic ? '⏳ قيد المراجعة (مخفي)' : '⏳ Pending Approval (Hidden)')}
{r.is_featured === 1 && (
🌟 {isArabic ? 'مميز' : 'Featured'}
)}
{r.review_title && (
"{r.review_title}"
)}
{r.review_text}
{new Date(r.created_at).toLocaleString()}
handleToggleReviewApprove(r.id, r.is_approved === 1)}
className="btn btn-primary"
style={{
padding: '6px 14px',
fontSize: '0.82rem',
background: r.is_approved === 1 ? 'var(--bg-primary)' : 'var(--success)',
color: r.is_approved === 1 ? 'var(--text-primary)' : 'white',
border: r.is_approved === 1 ? '1px solid var(--border-color)' : 'none'
}}
>
{r.is_approved === 1
? (isArabic ? 'إلغاء الاعتماد (إخفاء)' : 'Unapprove (Hide)')
: (isArabic ? '✓ اعتماد ونشر في الموقع' : '✓ Approve & Publish')}
handleToggleReviewFeature(r.id, r.is_featured === 1)}
className="btn btn-secondary"
style={{ padding: '6px 12px', fontSize: '0.82rem' }}
>
{r.is_featured === 1 ? (isArabic ? 'إلغاء التمييز' : 'Unfeature') : (isArabic ? '🌟 تمييز في الواجهة' : '🌟 Set Featured')}
handleDeleteReview(r.id)}
style={{
padding: '6px 12px',
fontSize: '0.82rem',
background: 'rgba(239,68,68,0.1)',
color: 'var(--error)',
border: '1px solid rgba(239,68,68,0.3)',
borderRadius: '8px',
cursor: 'pointer',
fontWeight: 700
}}
>
{isArabic ? 'حذف' : 'Delete'}
))}
)}
)}
>
)}
);
}