	/**
	 * Current Joomla Version Being Build
	 *
	 * @var     int
	 * @since 3.2.0
	 **/
	protected $targetVersion;

	/**
	 * Current Joomla Version We are IN
	 *
	 * @var     int
	 * @since 3.2.0
	 **/
	protected $currentVersion;

	/**
	 * Registers the service provider with a DI container.
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  void
	 * @since 3.2.0
	 */
	public function register(Container $container)
	{
		$container->alias(CompilerField::class, 'Field')
			->share('Field', [$this, 'getCompilerField'], true);

		$container->alias(Data::class, 'Field.Data')
			->share('Field.Data', [$this, 'getData'], true);

		$container->alias(Groups::class, 'Field.Groups')
			->share('Field.Groups', [$this, 'getGroups'], true);

		$container->alias(Attributes::class, 'Field.Attributes')
			->share('Field.Attributes', [$this, 'getAttributes'], true);

		$container->alias(Name::class, 'Field.Name')
			->share('Field.Name', [$this, 'getName'], true);

		$container->alias(TypeName::class, 'Field.Type.Name')
			->share('Field.Type.Name', [$this, 'getTypeName'], true);

		$container->alias(UniqueName::class, 'Field.Unique.Name')
			->share('Field.Unique.Name', [$this, 'getUniqueName'], true);

		$container->alias(Rule::class, 'Field.Rule')
			->share('Field.Rule', [$this, 'getRule'], true);

		$container->alias(Customcode::class, 'Field.Customcode')
			->share('Field.Customcode', [$this, 'getCustomcode'], true);

		$container->alias(DatabaseName::class, 'Field.Database.Name')
			->share('Field.Database.Name', [$this, 'getDatabaseName'], true);

		$container->alias(J3CoreRule::class, 'J3.Field.Core.Rule')
			->share('J3.Field.Core.Rule', [$this, 'getJ3CoreRule'], true);

		$container->alias(J4CoreRule::class, 'J4.Field.Core.Rule')
			->share('J4.Field.Core.Rule', [$this, 'getJ4CoreRule'], true);

		$container->alias(J3CoreField::class, 'J3.Field.Core.Field')
			->share('J3.Field.Core.Field', [$this, 'getJ3CoreField'], true);

		$container->alias(J4CoreField::class, 'J4.Field.Core.Field')
			->share('J4.Field.Core.Field', [$this, 'getJ4CoreField'], true);

		$container->alias(J3InputButton::class, 'J3.Field.Input.Button')
			->share('J3.Field.Input.Button', [$this, 'getJ3InputButton'], true);

		$container->alias(J4InputButton::class, 'J4.Field.Input.Button')
			->share('J4.Field.Input.Button', [$this, 'getJ4InputButton'], true);

		$container->alias(CoreField::class, 'Field.Core.Field')
			->share('Field.Core.Field', [$this, 'getCoreField'], true);

		$container->alias(CoreRule::class, 'Field.Core.Rule')
			->share('Field.Core.Rule', [$this, 'getCoreRule'], true);

		$container->alias(InputButton::class, 'Field.Input.Button')
			->share('Field.Input.Button', [$this, 'getInputButton'], true);
	}

	/**
	 * Get The Field Class.
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  CompilerField
	 * @since 3.2.0
	 */
	public function getCompilerField(Container $container): CompilerField
	{
		return new CompilerField(
			$container->get('Field.Data'),
			$container->get('Field.Name'),
			$container->get('Field.Type.Name'),
			$container->get('Field.Unique.Name')
		);
	}

	/**
	 * Get The Data Class.
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  Data
	 * @since 3.2.0
	 */
	public function getData(Container $container): Data
	{
		return new Data(
			$container->get('Config'),
			$container->get('Event'),
			$container->get('History'),
			$container->get('Placeholder'),
			$container->get('Customcode'),
			$container->get('Field.Customcode'),
			$container->get('Field.Rule')
		);
	}

	/**
	 * Get The Groups Class.
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  Groups
	 * @since 3.2.0
	 */
	public function getGroups(Container $container): Groups
	{
		return new Groups();
	}

	/**
	 * Get The Attributes Class.
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  Attributes
	 * @since 3.2.0
	 */
	public function getAttributes(Container $container): Attributes
	{
		return new Attributes(
			$container->get('Config'),
			$container->get('Registry'),
			$container->get('Compiler.Builder.List.Field.Class'),
			$container->get('Compiler.Builder.Do.Not.Escape'),
			$container->get('Placeholder'),
			$container->get('Customcode'),
			$container->get('Language'),
			$container->get('Field.Groups')
		);
	}

	/**
	 * Get The Name Class.
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  Name
	 * @since 3.2.0
	 */
	public function getName(Container $container): Name
	{
		return new Name(
			$container->get('Placeholder'),
			$container->get('Field.Unique.Name'),
			$container->get('Compiler.Builder.Category.Other.Name')
		);
	}

	/**
	 * Get The TypeName Class.
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  TypeName
	 * @since 3.2.0
	 */
	public function getTypeName(Container $container): TypeName
	{
		return new TypeName();
	}

	/**
	 * Get The UniqueName Class.
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  UniqueName
	 * @since 3.2.0
	 */
	public function getUniqueName(Container $container): UniqueName
	{
		return new UniqueName(
			$container->get('Registry')
		);
	}

	/**
	 * Get The Rule Class.
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  Rule
	 * @since 3.2.0
	 */
	public function getRule(Container $container): Rule
	{
		return new Rule(
			$container->get('Registry'),
			$container->get('Customcode'),
			$container->get('Customcode.Gui'),
			$container->get('Placeholder'),
			$container->get('Field.Core.Rule')
		);
	}

	/**
	 * Get The Customcode Class.
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  Customcode
	 * @since 3.2.0
	 */
	public function getCustomcode(Container $container): Customcode
	{
		return new Customcode(
			$container->get('Customcode.Dispenser')
		);
	}

	/**
	 * Get The DatabaseName Class.
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  DatabaseName
	 * @since 3.2.0
	 */
	public function getDatabaseName(Container $container): DatabaseName
	{
		return new DatabaseName(
			$container->get('Compiler.Builder.Lists'),
			$container->get('Registry')
		);
	}

	/**
	 * Get The CoreRule Class.
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  J3CoreRule
	 * @since 3.2.0
	 */
	public function getJ3CoreRule(Container $container): J3CoreRule
	{
		return new J3CoreRule();
	}

	/**
	 * Get The CoreRule Class.
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  J4CoreRule
	 * @since 3.2.0
	 */
	public function getJ4CoreRule(Container $container): J4CoreRule
	{
		return new J4CoreRule();
	}

	/**
	 * Get The CoreField Class.
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  J3CoreField
	 * @since 3.2.0
	 */
	public function getJ3CoreField(Container $container): J3CoreField
	{
		return new J3CoreField();
	}

	/**
	 * Get The CoreField Class.
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  J4CoreField
	 * @since 3.2.0
	 */
	public function getJ4CoreField(Container $container): J4CoreField
	{
		return new J4CoreField();
	}

	/**
	 * Get The J3InputButton Class.
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  J3InputButton
	 * @since 3.2.0
	 */
	public function getJ3InputButton(Container $container): J3InputButton
	{
		return new J3InputButton(
			$container->get('Config'),
			$container->get('Placeholder'),
			$container->get('Compiler.Creator.Permission')
		);
	}

	/**
	 * Get The J4InputButton Class.
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  J4InputButton
	 * @since 3.2.0
	 */
	public function getJ4InputButton(Container $container): J4InputButton
	{
		return new J4InputButton(
			$container->get('Config'),
			$container->get('Placeholder'),
			$container->get('Compiler.Creator.Permission')
		);
	}

	/**
	 * Get The CoreFieldInterface Class.
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  CoreField
	 * @since 3.2.0
	 */
	public function getCoreField(Container $container): CoreField
	{
		if (empty($this->currentVersion))
		{
			$this->currentVersion = Version::MAJOR_VERSION;
		}

		return $container->get('J' . $this->currentVersion . '.Field.Core.Field');
	}

	/**
	 * Get The CoreRuleInterface Class.
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  CoreRule
	 * @since 3.2.0
	 */
	public function getCoreRule(Container $container): CoreRule
	{
		if (empty($this->currentVersion))
		{
			$this->currentVersion = Version::MAJOR_VERSION;
		}

		return $container->get('J' . $this->currentVersion . '.Field.Core.Rule');
	}

	/**
	 * Get The InputButton Class.
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  InputButton
	 * @since 3.2.0
	 */
	public function getInputButton(Container $container): InputButton
	{
		if (empty($this->targetVersion))
		{
			$this->targetVersion = $container->get('Config')->joomla_version;
		}

		return $container->get('J' . $this->targetVersion . '.Field.Input.Button');
	}