<?php

namespace Repetito\Web;

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

use DVDoug\BoxPacker\Item;

class TestItem implements Item {


	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;
	}

	public function getKeepFlat(): bool {
		return false;
	}

	/**
	 * Item SKU etc.
	 */
	public function getDescription(): string {
		return $this->name;
	}

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

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

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

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

}
