	/**
	 * 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(AdminviewData::class, 'Adminview.Data')
			->share('Adminview.Data', [$this, 'getAdminviewData'], true);

		$container->alias(Permission::class, 'Adminview.Permission')
			->share('Adminview.Permission', [$this, 'getAdminviewPermission'], true);
	}

	/**
	 * Get the Compiler Adminview Data
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  AdminviewData
	 * @since 3.2.0
	 */
	public function getAdminviewData(Container $container): AdminviewData
	{
		return new AdminviewData(
			$container->get('Config'),
			$container->get('Event'),
			$container->get('Placeholder'),
			$container->get('Customcode.Dispenser'),
			$container->get('Model.Customtabs'),
			$container->get('Model.Tabs'),
			$container->get('Model.Fields'),
			$container->get('Model.Historyadminview'),
			$container->get('Model.Permissions'),
			$container->get('Model.Conditions'),
			$container->get('Model.Relations'),
			$container->get('Model.Linkedviews'),
			$container->get('Model.Javascriptadminview'),
			$container->get('Model.Cssadminview'),
			$container->get('Model.Phpadminview'),
			$container->get('Model.Custombuttons'),
			$container->get('Model.Customimportscripts'),
			$container->get('Model.Ajaxadmin'),
			$container->get('Model.Customalias'),
			$container->get('Model.Sql'),
			$container->get('Model.Mysqlsettings'),
			$container->get('Compiler.Builder.Site.Edit.View')
		);
	}

	/**
	 * Get the Compiler Adminview Permission
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  Permission
	 * @since 3.2.0
	 */
	public function getAdminviewPermission(Container $container): Permission
	{
		return new Permission(
			$container->get('Compiler.Builder.Has.Permissions')
		);
	}