<?php
/**
 * Class LabelSettings
 *
 * @package FS\InPost\Shipment
 */

namespace FS\InPost\Shipment;

/**
 * Label Settings.
 */
class LabelSettings {

	/**
	 * @var string
	 */
	private $type;

	/**
	 * @var string
	 */
	private $format;

	/**
	 * @var bool
	 */
	private $group;

	/**
	 * @param string $type   .
	 * @param string $format .
	 * @param bool   $group  .
	 */
	public function __construct( string $type, string $format, bool $group = false ) {
		$this->type   = $type;
		$this->format = $format;
		$this->group  = $group;
	}

	/**
	 * @return string
	 */
	public function get_type(): string {
		switch ( $this->type ) {
			case 'A6':
				return 'A6';
			default:
				return 'normal';
		}
	}

	/**
	 * @return string
	 */
	public function get_format(): string {
		switch ( $this->format ) {
			case 'epl':
				return 'Epl';
			case 'zpl':
				return 'Zpl';
			default:
				return 'Pdf';
		}
	}

	/**
	 * @return string
	 */
	public function get_extension(): string {
		return $this->format;
	}

	/**
	 * @return bool
	 */
	public function is_group(): bool {
		return $this->group;
	}
}
