import React, { useMemo, useState } from 'react'; import { Link } from 'react-router-dom'; import { SearchHeaderP } from '../../pages/subscriptionIcons'; /** * Settings sub-navigation for the subscription page — item list and order copied * verbatim from clinic-pro-tauri's `PurchaseSubscription.jsx` navItems, minus * "مدیریت پزشک" (that lives in the main nav / doctor profile, not here). Shown * ungated to mirror the tauri source. Each entry maps to a real admin route; the * "تنظیمات" (security) section has no doctor/clinic route yet → disabled. * * This list is intentionally separate from SETTINGS_MENU (SettingsLayout) so the * other settings pages are not affected. */ type NavItem = { key: string; label: string; to?: string }; const NAV_ITEMS: NavItem[] = [ { key: 'subscription', label: 'خرید اشتراک', to: '/admin/subscription' }, { key: 'payment', label: 'مدیریت پرداخت', to: '/admin/my-financial' }, { key: 'appointment', label: 'مدیریت نوبت دهی', to: '/admin/appointment-settings' }, { key: 'insurance', label: 'مدیریت بیمه', to: '/admin/insurance-pricing' }, { key: 'tags', label: 'تگ ها', to: '/admin/tags-settings' }, { key: 'sms', label: 'پیامک ها', to: '/admin/sms-wallet' }, { key: 'clinic', label: 'مدیریت مطب', to: '/admin/my-clinic' }, { key: 'secretary', label: 'مدیریت منشی', to: '/admin/my-secretaries' }, { key: 'staff', label: 'پرسنل', to: '/admin/staff' }, { key: 'account', label: 'حساب کاربری', to: '/admin/account-settings' }, { key: 'security', label: 'تنظیمات' }, ]; export default function PurchaseSubscriptionSidebar({ active }: { active: string }) { const [query, setQuery] = useState(''); const items = useMemo( () => NAV_ITEMS.filter((i) => i.label.includes(query.trim())), [query], ); return ( ); }