import clsx from "clsx"; import { MediaDto } from "../../../application/dtos/entities/MediaDto"; import {ButtonTertiary} from "../buttons/ButtonTertiary"; import DownloadIcon from "../icons/DownloadIcon"; import EyeIcon from "../icons/EyeIcon"; import PaperClipIcon from "../icons/PaperClipIcon"; import TrashIcon from "../icons/TrashIcon"; import CheckIcon from "../icons/CheckIcon"; interface Props { item: MediaDto; onChangeTitle: (e: string) => void; onDelete: () => void; onDownload: () => void; onPreview?: () => void; readOnly?: boolean; } export default function MediaItem({ item, onChangeTitle, onDelete, onDownload, onPreview, readOnly }: Props) { return (
{readOnly ? (
{onPreview && ( )}
) : (
{/*
{item.name.substring(item.name.lastIndexOf(".") + 1)}
*/}
{item.title}
{/* onChangeTitle(e.toString())} className="w-full rounded-sm" /> */} {/*
.{type.split("/")[1]}
*/}
onDelete()} className="group p-2 hover:bg-gray-50">
)}
); }