import React, { useCallback } from 'react';
// @ts-ignore
import Highlighter from 'react-highlight-words';
import { css } from 'emotion';
import { Icon, IconName, Button, LinkButton, Card } from '@grafana/ui';
import { AlertRule } from '../../types';
export interface Props {
rule: AlertRule;
search: string;
onTogglePause: () => void;
}
const AlertRuleItem = ({ rule, search, onTogglePause }: Props) => {
const ruleUrl = `${rule.url}?editPanel=${rule.panelId}&tab=alert`;
const renderText = useCallback(
text => (