from typing import List

from src.domain.entities.merchant_offer import MerchantOffer
from src.domain.interfaces.merchant_offer_repository import MerchantOfferRepositoryInterface


class GetMerchantOffersUseCase:
    """Returns all active financing offers for a merchant."""

    def __init__(self, offer_repo: MerchantOfferRepositoryInterface):
        self.offer_repo = offer_repo

    def execute(self, merchant_id: int) -> List[MerchantOffer]:
        return self.offer_repo.get_active_by_merchant(merchant_id)
