<?php
/**
 * Class DhlServices
 *
 * @package DhlPolska\Shipment
 */

declare(strict_types=1);

namespace DhlPolska\Shipment;

/**
 * DHL Services definitions and categorization.
 */
class DhlServices {

	public const SERVICE_AH      = 'AH';
	public const SERVICE_09      = '09';
	public const SERVICE_12      = '12';
	public const SERVICE_DW      = 'DW';
	public const SERVICE_EK      = 'EK';
	public const SERVICE_PI      = 'PI';
	public const SERVICE_PREMIUM = 'PREMIUM';
	public const SERVICE_CP      = 'CP';
	public const SERVICE_CM      = 'CM';
	public const SERVICE_POINT   = 'SERVICEPOINT';

	/**
	 * @return array<int|string, string>
	 */
	public function get_domestic_services(): array {
		return [
			self::SERVICE_AH      => __( 'DHL Parcel Polska', 'dhl-polska' ),
			self::SERVICE_09      => __( 'DHL Parcel 09', 'dhl-polska' ),
			self::SERVICE_12      => __( 'DHL Parcel 12', 'dhl-polska' ),
			self::SERVICE_DW      => __( 'Doręczenie wieczorne', 'dhl-polska' ),
			self::SERVICE_PREMIUM => __( 'DHL Parcel Premium', 'dhl-polska' ),
		];
	}

	/**
	 * @return array<string, string>
	 * @internal
	 */
	public function get_international_services(): array {
		return [
			self::SERVICE_EK => __( 'DHL Connect', 'dhl-polska' ),
			self::SERVICE_PI => __( 'DHL International', 'dhl-polska' ),
			self::SERVICE_CP => __( 'DHL Connect Plus', 'dhl-polska' ),
			self::SERVICE_CM => __( 'DHL Connect Plus Paleta', 'dhl-polska' ),
		];
	}

	/**
	 * @return array<string, string>
	 */
	public function get_pickup_point_services(): array {
		return [
			self::SERVICE_POINT => __( 'DHL Economy i DHL Connect Parcelshop', 'dhl-polska' ),
		];
	}

	/**
	 * @return array<string, string>
	 */
	public function get_all_services(): array {
		return $this->get_domestic_services()
			+ $this->get_international_services()
			+ $this->get_pickup_point_services();
	}
}
