import React, { useMemo, useState } from 'react'; import { Link } from 'react-router-dom'; import { useAuthStore } from '../../stores/authStore'; import { menuForRole } from './SettingsLayout'; import { SearchHeaderP } from '../../pages/subscriptionIcons'; /** * PurchaseSubscriptionSidebar — settings sub-navigation styled after * clinic-pro-tauri's `PurchaseSubscriptionSidebar.jsx` (title + search + tab * list, orange active pill #f17732). Desktop-only, like the rest of the * clinicpro settings area (mobile nav is owned by the standalone settings list * page). Each item is a real admin route (SETTINGS_MENU / menuForRole) so the * routing architecture is preserved. `active` marks the open section. */ export default function PurchaseSubscriptionSidebar({ active }: { active: string }) { const primaryRole = useAuthStore((s) => s.primaryRole); const [query, setQuery] = useState(''); const items = useMemo( () => menuForRole(primaryRole).filter((i) => i.label.includes(query.trim())), [primaryRole, query], ); return ( ); }