<?php
/**
 * Controller factory for dependency injection.
 *
 * @package PDFDraft
 */

namespace PDFDraft\Support\Factory;

use PDFDraft\Contracts\Services\ImageServiceInterface;

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

/**
 * Factory for creating controllers with dependencies.
 */
class ControllerFactory {

	/**
	 * Create PDFDesignsController instance.
	 *
	 * @param string $post_type Post type name.
	 * @return \PDFDraft\Controllers\V1\PDFDesignsController
	 */
	public static function createPDFDesignsController( string $post_type ): \PDFDraft\Controllers\V1\PDFDesignsController {
		$imageService = pdfdraft( ImageServiceInterface::class );
		return new \PDFDraft\Controllers\V1\PDFDesignsController( $post_type, $imageService );
	}
}
