import type { OdFolderObject } from '../types'
import Link from 'next/link'
import emojiRegex from 'emoji-regex'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { useClipboard } from 'use-clipboard-copy'
import { getFileIcon } from '../utils/getFileIcon'
import { getBaseUrl } from '../utils/getBaseUrl'
import { formatModifiedDateTime } from '../utils/fileDetails'
import { Checkbox, Downloading } from './FileListing'
type OdFolderChildren = OdFolderObject['value'][number]
const GridItem = ({ c }: { c: OdFolderChildren }) => {
const emojiIcon = emojiRegex().exec(c.name)
const renderEmoji = emojiIcon && !emojiIcon.index
const ChildIcon = () =>
renderEmoji ? (
{emojiIcon ? emojiIcon[0] : '📁'}
) : (