import React from 'react'; import { Button } from '../Button'; import { Input } from '../Input'; import { Badge } from '../Badge'; import { Icon } from '../Icon'; export interface BulkAction { label: string; onClick: () => void; destructive?: boolean; } export interface DataTableToolbarProps extends React.HTMLAttributes { searchQuery?: string; onSearchChange?: (query: string) => void; searchPlaceholder?: string; selectedCount?: number; bulkActions?: BulkAction[]; onCreate?: () => void; createLabel?: string; onExport?: () => void; } export const DataTableToolbar: React.FC = ({ searchQuery = '', onSearchChange, searchPlaceholder = 'بحث وتصفية الجدول...', selectedCount = 0, bulkActions = [], onCreate, createLabel = 'إضافة سجل جديد', onExport, className = '', ...props }) => { return (
onSearchChange?.(e.target.value)} placeholder={searchPlaceholder} startAdornment={} aria-label={searchPlaceholder} />
{selectedCount > 0 && bulkActions.length > 0 && (
{selectedCount} محدد {bulkActions.map((act, idx) => ( ))}
)}
{onExport && ( )} {onCreate && ( )}
); };