<?php

namespace Repetito\Web;

// If this file is called directly, abort.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

use DVDoug\BoxPacker\Box;

class TestBox implements Box {


	private $name;
	private $width;
	private $length;
	private $depth;

	public function __construct(
		string $name,
		int $width,
		int $length,
		int $depth
	) {
		$this->name   = $name;
		$this->width  = $width;
		$this->length = $length;
		$this->depth  = $depth;
	}

	/**
	 * Reference for box type (e.g. SKU or description).
	 */
	public function getReference(): string {
		return $this->name;
	}

	/**
	 * Outer width in mm.
	 */
	public function getOuterWidth(): int {
		return $this->width * 10;
	}

	/**
	 * Outer length in mm.
	 */
	public function getOuterLength(): int {
		return $this->length * 10;
	}

	/**
	 * Outer depth in mm.
	 */
	public function getOuterDepth(): int {
		return $this->depth * 10;
	}

	/**
	 * Empty weight in g.
	 */
	public function getEmptyWeight(): int {
		return 0;
	}

	/**
	 * Inner width in mm.
	 */
	public function getInnerWidth(): int {
		return $this->width * 10;
	}

	/**
	 * Inner length in mm.
	 */
	public function getInnerLength(): int {
		return $this->length * 10;
	}

	/**
	 * Inner depth in mm.
	 */
	public function getInnerDepth(): int {
		return $this->depth * 10;
	}

	/**
	 * Max weight the packaging can hold in g.
	 */
	public function getMaxWeight(): int {
		return 999999999999999;
	}
}
