from typing import Optional
from src.domain.entities.merchant import MerchantLocation
from src.domain.interfaces.merchant_repository import MerchantRepositoryInterface

class GetLocationUseCase:
    def __init__(self, repository: MerchantRepositoryInterface):
        self.repository = repository

    def execute(self, location_id: int) -> Optional[MerchantLocation]:
        return self.repository.get_location_by_id(location_id)
