<?php
/**
 * Class ConnectionStatusField
 *
 * @package DhlPolska\WooCommerceSettings\Field
 */

namespace DhlPolska\WooCommerceSettings\Field;

use DhlPolskaVendor\WPDesk\PluginBuilder\Plugin\Hookable;

/**
 * Register Connection Status Field.
 */
class ConnectionStatusField implements Hookable {

	public const FIELD_TYPE = 'dhl_polska_connection_status';

	/**
	 * Hooks.
	 */
	public function hooks() {
		add_action(
			'woocommerce_admin_field_' . self::FIELD_TYPE,
			[
				$this,
				'output_connection_status',
			]
		);
	}

	/**
	 * @param array $value .
	 *
	 * @return void
	 */
	public function output_connection_status( $value ) {
		$ajax = $value['ajax'];

		include __DIR__ . '/views/html-connection-status-field.php';
	}
}
