<?php
/**
 * Order model factory.
 *
 * @package flo-sync
 */

namespace NMFS\Sync\Items\Orders;

use NMFS\Sync\Items\Orders\Models\Order_Model;
use NMFS\Sync\Items\Orders\Models\Order_Refund_Model;
use WC_Order;
use WC_Order_Refund;

defined( 'ABSPATH' ) || exit;

/**
 * Class Order_Model_Factory
 */
class Order_Model_Factory {

	/**
	 * Retrieve the order model for the given order.
	 *
	 * @param WC_Order $order The order object to retrieve the model for.
	 *
	 * @return Order_Model
	 */
	public static function get_order_model( WC_Order $order ): Order_Model {
		return new Order_Model( $order );
	}

	/**
	 * Retrieves the order refund model for a given order refund object.
	 *
	 * @param WC_Order_Refund $order The refund order object.
	 *
	 * @return Order_Refund_Model
	 */
	public static function get_order_refund_model( WC_Order_Refund $order ): Order_Refund_Model {
		return new Order_Refund_Model( $order );
	}
}
