from typing import Dict
from typing import Any


def get_stratum_alert_data(threshold: float, notification_channel: int) -> Dict[str, Any]:
    """ Gets alert config for when stratum goes below given threshold

        :param threshold: Below this value, grafana should send an alert
        :type description: float

        :param notification_channel: Id of the notification channel the alert should be sent to
        :type notification_channel: int

        :return: Data of the alert
        :rtype: Dict
    """
    return {
        "conditions": [
            {
                "evaluator": {
                    "params": [threshold],
                    "type": "lt"
                },
                "operator": {"type": "and"},
                "query": {
                    "params": ["A", "5m", "now"]
                },
                "reducer": {
                    "params": [],
                    "type": "avg"
                },
                "type": "query"
            }
        ],
        "executionErrorState": "alerting",
        "frequency": "60s",
        "handler": 1,
        "name": "Estimated hash rate on stratum alert",
        "noDataState": "alerting",
        "notifications": [{"id": notification_channel}]
    }