<?php
/**
 * Optional dependency notices.
 *
 * PDF / Dompdf checks live in the Pro add-on. The free plugin has no bundled
 * Composer libraries that require runtime verification.
 *
 * @package Lucrativeit_Subscription_Recurring_Billing
 */

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

/**
 * Placeholder for legacy callers; Dompdf is no longer shipped with the free plugin.
 */
class LUCRSURE_Dependencies {

	/**
	 * Register hooks (no free-plugin dependency notices).
	 */
	public static function init() {
		// Intentionally empty — Dompdf is verified by the Pro add-on.
	}

	/**
	 * Legacy no-op kept for activation/bootstrap compatibility.
	 *
	 * @return array{ok:bool,missing_vendor:bool,missing_extensions:array}
	 */
	public static function verify() {
		$result = array(
			'ok'                 => true,
			'missing_vendor'     => false,
			'missing_extensions' => array(),
			'checked_at'         => current_time( 'mysql' ),
		);

		update_option( 'lucrsure_dependency_status', $result, false );

		return $result;
	}

	/**
	 * Whether PDF generation is available (delegates to the Pro filter path).
	 *
	 * @return bool
	 */
	public static function pdf_ready() {
		return (bool) apply_filters( 'lucrsure_pdf_ready', false );
	}

	/**
	 * Legacy no-op — free plugin does not ship a Composer vendor tree.
	 *
	 * @return bool
	 */
	public static function vendor_autoload_exists() {
		return false;
	}

	/**
	 * Legacy no-op — free plugin does not ship a Composer vendor tree.
	 *
	 * @return bool
	 */
	public static function load_vendor() {
		return false;
	}
}
