import {Fragment} from 'react'; import styled from '@emotion/styled'; import Access from 'sentry/components/acl/access'; import {Role} from 'sentry/components/acl/role'; import {Button} from 'sentry/components/button'; import ButtonBar from 'sentry/components/buttonBar'; import Confirm from 'sentry/components/confirm'; import FileSize from 'sentry/components/fileSize'; import Link from 'sentry/components/links/link'; import TimeSince from 'sentry/components/timeSince'; import {Tooltip} from 'sentry/components/tooltip'; import {IconClock, IconDelete, IconDownload} from 'sentry/icons'; import {t, tct} from 'sentry/locale'; import {space} from 'sentry/styles/space'; import {DebugFile} from 'sentry/types/debugFiles'; import {ProguardMappingAssociation} from 'sentry/views/settings/projectProguard'; import {ProguardAssociations} from 'sentry/views/settings/projectProguard/associations'; type Props = { downloadRole: string; downloadUrl: string; mapping: DebugFile; onDelete: (id: string) => void; orgSlug: string; associations?: ProguardMappingAssociation; }; function ProjectProguardRow({ associations = {releases: []}, mapping, onDelete, downloadUrl, downloadRole, orgSlug, }: Props) { const {id, debugId, uuid, size, dateCreated} = mapping; const handleDeleteClick = () => { onDelete(id); }; return ( {debugId || uuid || `(${t('empty')})`} {({hasRole}) => ( , } )} disabled={hasRole} isHoverable >