import React from "react"; import { Button } from "@/components/ui/button.tsx"; import { Trash2, Folder, File, Plus, Pin } from "lucide-react"; import { Tabs, TabsList, TabsTrigger, TabsContent, } from "@/components/ui/tabs.tsx"; import { Input } from "@/components/ui/input.tsx"; import { useState } from "react"; import { useTranslation } from "react-i18next"; import type { FileItem, ShortcutItem } from "../../../types/index"; interface FileManagerHomeViewProps { recent: FileItem[]; pinned: FileItem[]; shortcuts: ShortcutItem[]; onOpenFile: (file: FileItem) => void; onRemoveRecent: (file: FileItem) => void; onPinFile: (file: FileItem) => void; onUnpinFile: (file: FileItem) => void; onOpenShortcut: (shortcut: ShortcutItem) => void; onRemoveShortcut: (shortcut: ShortcutItem) => void; onAddShortcut: (path: string) => void; } export function FileManagerHomeView({ recent, pinned, shortcuts, onOpenFile, onRemoveRecent, onPinFile, onUnpinFile, onOpenShortcut, onRemoveShortcut, onAddShortcut, }: FileManagerHomeViewProps) { const { t } = useTranslation(); const [tab, setTab] = useState<"recent" | "pinned" | "shortcuts">("recent"); const [newShortcut, setNewShortcut] = useState(""); const renderFileCard = ( file: FileItem, onRemove: () => void, onPin?: () => void, isPinned = false, ) => (