import React from 'react'; import { useNavigate } from 'react-router-dom'; import type { AccountMenuRowItem } from '../../data/accountData'; interface AccountMenuRowProps { row: AccountMenuRowItem; } /** * Reusable menu row on `shop-category` Account Overview (4214:345) and `provider requst` (4214:10531). * - Dimensions: 317×34 at (29, row.y) */ export const AccountMenuRow: React.FC = ({ row }) => { const navigate = useNavigate(); return (
{ if (row.targetRoute) { navigate(row.targetRoute); } }} style={{ width: '100%', minHeight: 38, display: 'flex', alignItems: 'center', gap: 9, cursor: row.targetRoute ? 'pointer' : 'default', minWidth: 0, }} > {/* Left 34×34 icon container (radius 11) */}
{/* Notification badge */} {row.badgeCount && (
{row.badgeCount}
)}
{/* Title & optional subtitle */}
{row.title}
{row.subtitle && (
{row.subtitle}
)}
{/* Right accessory icon */} {row.rightIconType === 'edit-path' && ( )} {row.rightIconType === 'arrow-right' && ( )} {row.rightIconType === 'external-link' && ( )}
); };