<?php

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

require_once __DIR__ . '/../vendor/autoload.php';

global $pdfdraft;

$pdfdraft = require_once __DIR__ . '/../configs/di.php';

/**
 * @template T
 * @param class-string<T> $className
 *
 * @throws \DI\DependencyException
 * @throws \DI\NotFoundException;
 *
 * @return T|mixed
 */
function pdfdraft( string $className ) {
	/** @var \DI\Container $pdfdraft */
	global $pdfdraft;
	return $pdfdraft->get( $className );
}
