import React from 'react' import cn from 'classnames'; import stl from './alertItem.module.css'; import AlertTypeLabel from './AlertTypeLabel'; const AlertItem = props => { const { alert, onEdit, active } = props; const getThreshold = threshold => { if (threshold === 15) return '15 Minutes'; if (threshold === 30) return '30 Minutes'; if (threshold === 60) return '1 Hour'; if (threshold === 120) return '2 Hours'; if (threshold === 240) return '4 Hours'; if (threshold === 1440) return '1 Day'; } const getNotifyChannel = alert => { let str = ''; if (alert.slack) str = 'Slack'; if (alert.email) str += (str === '' ? '' : ' and ')+ 'Email'; if (alert.webhool) str += (str === '' ? '' : ' and ')+ 'Webhook'; if (str === '') return 'OpenReplay'; return str; } const isThreshold = alert.detectionMethod === 'threshold'; return (