Dynamic editor properties

Hello,
I was wondering if there is a possible way of achieving a dynamic property window…
what i mean is as follows:

there is an enum with 2 values…

enum Type
{
  TypeA,
  TypeB
};

and 2 structs…

strcut FA
{
  int range;
};

and

struct FB
{
  int length;
  int sweep;
};

now what im trying to achieve, is to have in a certain blueprint in the editor the option to choose from the enum (typeA or TypeB)
and based on that choice a property would appear:

if typeA was chosen, FA would be the value and its properties may be edited.

if typeB was, FB would be the value and its properties may be edited.

my initial thought was to add all the properties to the blueprint code, and when changing the enum value, edit their visibility with the detail panel customization.
but then ill have to keep “garbage” in the class.

is there any other possible way?