'use client' import type { Dispatch, SetStateAction } from 'react' import type { MemberTab } from '../types' interface MembersTabsProps { activeTab: MemberTab setActiveTab: Dispatch> total: number paymentIssues: number unverified: number } // Full-bleed tab bar (sits directly under the page header, outside the padded // content region), so it is its own component rather than part of the filters. export function MembersTabs({ activeTab, setActiveTab, total, paymentIssues, unverified }: MembersTabsProps) { return (
{[ { key: 'all', label: `All ${total}` }, { key: 'payment_issues', label: `Payment Issues ${paymentIssues}` }, { key: 'unverified', label: `Pending Approval ${unverified}` }, { key: 'inactive', label: 'Inactive' }, ].map(({ key, label }) => ( ))}
) } interface MembersToolbarProps { search: string setSearch: Dispatch> tierFilter: string setTierFilter: Dispatch> canBulk: boolean selectedCount: number onBulkApprove: () => void onClearSelection: () => void } // Search + tier filter row, plus the bulk-actions bar shown when a selection // exists. Renders as a fragment so the surrounding padded content div is // unchanged. export function MembersToolbar({ search, setSearch, tierFilter, setTierFilter, canBulk, selectedCount, onBulkApprove, onClearSelection }: MembersToolbarProps) { return ( <>
setSearch(e.target.value)} className="w-full bg-card border border-border rounded pl-9 pr-4 py-2 font-sans text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:border-primary transition" />
{canBulk && selectedCount > 0 && (
{selectedCount} selected
)} ) }