private static @NotNull WizardContext createWizardContext(@NotNull Pair<JPanel, JBList<AnAction>> pair, Disposable disposable) {
    WizardContext wizardContext = new WizardContext(null, disposable);
    wizardContext.addContextListener(new WizardContext.Listener() {
      @Override
      public void switchToRequested(@NotNull String placeId, @NotNull Consumer<? super Step> configure) {
        String wizardName = clearPrefix(placeId);
        List<AnAction> allWizards = SequencesKt.toList(UiUtils.asSequence(pair.second.getModel()));
        AnAction wizardToSelect = ContainerUtil.find(allWizards, wizard -> wizard.getTemplateText().equals(wizardName));
        if (wizardToSelect != null) {
          pair.second.setSelectedValue(wizardToSelect, true);
        }
        if (wizardToSelect instanceof ProjectSettingsStepBase<?> stepBase) {
          ProjectGeneratorPeer<?> peer = stepBase.getPeer();
          configure.accept(new ProjectStepPeerHolder(peer));
        }
      }

      private static @NotNull String clearPrefix(@NotNull String placeId) {
        return placeId.startsWith(NPW_PREFIX) ? placeId.substring(NPW_PREFIX.length()) : placeId;
      }
    });
    return wizardContext;
  }
private static @NotNull WizardContext createWizardContext(@NotNull Pair<JPanel, JBList<AnAction>> pair, Disposable disposable)