<?php
declare( strict_types=1 );

namespace FiboFilters\Product;

use FiboFilters\Integrations\Multilingual;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Class ProductFactory
 */
class ProductFactory {

	/** @var Multilingual */
	private $multilingual;

	public function __construct( Multilingual $multilingual ) {
		$this->multilingual = $multilingual;
	}

	/**
	 * @param \WP_Post|\WC_Product|int $product Post object, product object or product ID.
	 */
	public function get( $product ): Product {
		return new Product( $product, $this->multilingual );
	}
}
