<?php

namespace Opencart\Extension\Alsendo\Providers;

require_once(DIR_EXTENSION . 'alsendo/src/Models/OrderPickupPoint.php');
require_once(DIR_EXTENSION . 'alsendo/src/Repositories/OrderPickupPointRepository.php');

use Opencart\Extension\Alsendo\Models\OrderPickupPoint;
use Opencart\Extension\Alsendo\Repositories\OrderPickupPointRepository;

class OrderPickupPointProvider
{
    private OrderPickupPointRepository $orderPickupPointRepository;

    public function __construct(OrderPickupPointRepository $orderPickupPointRepository)
    {
        $this->orderPickupPointRepository = $orderPickupPointRepository;
    }

    public function getOrderPickupPointByOrderId(int $orderId): ?OrderPickupPoint
    {
        return $this->orderPickupPointRepository->getByOrderId($orderId);
    }
}
