class UberfireBreadcrumbs {

    Command generateBreadCrumbSelectCommand(final String perspective,
                                            final DefaultBreadcrumbsPresenter breadCrumb,
                                            final PlaceRequest placeRequest,
                                            final Command command) {
        if (command == null) {
            return null;
        }

        return () -> {
            removeDeepLevelBreadcrumbsIfNecessary(perspective, breadCrumb);

            breadCrumb.deactivate();

            if (placeRequest != null) {
                placeManager.goTo(placeRequest);
            }

            updateView();
            command.execute();
        };
    }

    @Inject public  UberfireBreadcrumbs(UberfireBreadcrumbsContainer uberfireBreadcrumbsContainer,
                               ManagedInstance<DefaultBreadcrumbsPresenter> breadcrumbsPresenters,
                               PlaceManager placeManager,
                               View view);

}