This WA can be customized to automatically select Talents and PVP talents based on the classes and specs of the enemy team when entering an arena.
Customizing it requires some LUA experience. I've included examples of some of the version that I use for various classes.
In order to customize the talents selected, create a copy of the template weak aura. Set the load conditions of the copy for whatever class you want the template to apply to. Then modify the aura_env.talents function at the top of the Weak Aura's custom code in the Actions tab.
There are some code comments explaining various functions that are available, but the examples for various classes will probably be the most helpful.
Basically, you call ae.talent(ae, row, index) to select a talent, and ae.PVPTalent(ae, row, index) to select a PVP talent.
Each of the parameters passed into aura_env.talents = function(ae, numPlayers, roles, classes, specs) provides some information about the enemy team
roles, classes and specs are lua tables (hash map arrays) that map the role, class or spec to the number of people on the enemy team playing that spec
The index parameter of ae.PVPTalent(ae, row, index) is the index of the PVP talent. To view the indexes for each PVP talent select the WeakAura group and the indexes of talents for the class your currently on will be printed to chat.
The keys for roles are "DPS", "HEALER", "TANK". So for example roles["DPS"] will be 2 if the enemy team has 2 DPS
The class parameter maps the class ID (https://wowpedia.fandom.com/wiki/ClassId) to the number of people playing that class on the enemy team
The specs parameter for the function has a table with which maps a spec ID (https://wowwiki-archive.fandom.com/wiki/SpecializationID) to the number of people on the enemy team with that spec. So for example specs[63] will be the number of fire mages on the enemy team
The custom function gets called each time someone joins the enemy team. As a result, the portion of the custom function which only gets run for 2s will still get called while doing 3s, and only 2 enemy players have joined the arena. As a result, any talents that get changed in the portion of the code that's supposed to run for 2s will need to be changed back in the code that runs for 3s, if the code is only supposed to run for 2s.
This is an example of a configuration that I did for the weak aura. Where someone sent a set of rules for selecting DH PVP talents, and I translated those rules into modification to the aura_env.talents function in the cusotm init function of the weak aura https://wago.io/gbYsH7F5m
ae.anyOf(ae, specs, {62, 63, 64}) is an example of using the anyOf helper function. You give it ae, and the specs (or classes) parameter and can pass a table of values. It will return true if the table you pass it contains any of the specified indexes. This can help you avoid writing out long if statements with many ors.