diff --git a/src/components/tts/TTSHeader.tsx b/src/components/tts/TTSHeader.tsx index 5a4c59c..f765674 100644 --- a/src/components/tts/TTSHeader.tsx +++ b/src/components/tts/TTSHeader.tsx @@ -1,6 +1,5 @@ import { Button } from '@/components/ui/button' import { Input } from '@/components/ui/input' -import { Label } from '@/components/ui/label' import { Select, SelectContent, @@ -8,15 +7,16 @@ import { SelectTrigger, SelectValue, } from '@/components/ui/select' -import { Plus, RefreshCw, Search } from 'lucide-react' +import type { TTSSortField, TTSSortOrder } from '@/lib/api/services/tts' +import { Plus, RefreshCw, Search, SortAsc, SortDesc, X } from 'lucide-react' interface TTSHeaderProps { searchQuery: string onSearchChange: (query: string) => void - sortBy: string - onSortByChange: (sortBy: string) => void - sortOrder: 'asc' | 'desc' - onSortOrderChange: (order: 'asc' | 'desc') => void + sortBy: TTSSortField + onSortByChange: (sortBy: TTSSortField) => void + sortOrder: TTSSortOrder + onSortOrderChange: (order: TTSSortOrder) => void onRefresh: () => void onCreateClick: () => void loading: boolean @@ -38,90 +38,94 @@ export function TTSHeader({ ttsCount, }: TTSHeaderProps) { return ( -
+ <> {/* Header */} -
+
-

Text to Speech

+

Text to Speech

Generate speech from text using various TTS providers

- +
+ {!loading && !error && ( +
+ {ttsCount} generation{ttsCount !== 1 ? 's' : ''} +
+ )} + +
- {/* Controls */} -
+ {/* Search and Sort Controls */} +
-
- + onSearchChange(e.target.value)} - className="pl-9" + onChange={e => onSearchChange(e.target.value)} + className="pl-9 pr-9" /> + {searchQuery && ( + + )}
-
- - -
+ -
- - -
+ -
- -
+
- - {/* Stats */} -
- - {ttsCount} generation{ttsCount !== 1 ? 's' : ''} - - {error && ( - Error: {error} - )} -
-
+ ) } \ No newline at end of file