from _StatisticBox import StatisticBox
from production.model import ProductionOrder
from typing import List, Any


class OrdersCounterStatisticBox(StatisticBox):
    def __init__(self, name, sons, publish_scheduler, logger, get_config):
        super(OrdersCounterStatisticBox, self).__init__(
            name,
            sons,
            publish_scheduler,
            logger,
            get_config
        )

    def get_order_value(self, order):
        # type: (ProductionOrder) -> Any

        return True

    def update_statistics(self, values):
        # type: (List[Any]) -> float

        return len(values)
