from typing import List

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


class ListMerchantOffersUseCase:
    """Returns all active (non-soft-deleted) offers for a given merchant."""

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

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