import {forwardRef} from 'react'; import styled from '@emotion/styled'; import {Button} from 'sentry/components/button'; import ConfirmDelete from 'sentry/components/confirmDelete'; import TextOverflow from 'sentry/components/textOverflow'; import {IconDelete, IconEdit} from 'sentry/icons'; import {t} from 'sentry/locale'; import {space} from 'sentry/styles/space'; import type {Rule} from './types'; import {getRuleDescription} from './utils'; type Props = { rules: Array; disabled?: boolean; onDeleteRule?: (id: Rule['id']) => void; onEditRule?: (id: Rule['id']) => void; }; const Rules = forwardRef(function RulesList( {rules, onEditRule, onDeleteRule, disabled}: Props, ref: React.Ref ) { return ( {rules.map(rule => { const {id} = rule; const ruleDescription = getRuleDescription(rule); return ( {ruleDescription} {onEditRule && (