class DisabledFeatureComponent implements IsElement {

    public void show(String featureId) {
        ExperimentalFeatureDefinition feature = defRegistry.getFeatureById(featureId);

        PortablePreconditions.checkNotNull("experimentalFeature", feature);

        String featureName = Optional.ofNullable(translationService.getTranslation(feature.getNameKey())).orElse(featureId);
        String text;

        if (feature.isGlobal()) {
            text = translationService.format(UberfireExperimentalConstants.disabledGlobalExperimentalFeature, featureName);
        } else {
            text = translationService.format(UberfireExperimentalConstants.disabledExperimentalFeature, featureName);
        }

        view.show(text);
    }

    @Inject public  DisabledFeatureComponent(DisabledFeatureComponentView view, ExperimentalFeatureDefRegistry defRegistry, TranslationService translationService);

}