public @NotNull WindowWrapper build() {
    return switch (myMode) {
      case FRAME -> new FrameWindowWrapper(this);
      case MODAL, NON_MODAL -> new DialogWindowWrapper(this);
    };
  }
public @NotNull WindowWrapper build()