#Japt, 37 bytes
Japt, 37 bytes
##Explanation "AJQKA" :String literal i1 :Insert at (0-based) index 1 Aò2 : Range [2,10] q : Join ) :End insert ø :Does that string contain any element in the following array? U :Input ñ :Sort Ì : By last element (grouping suits together) òÏ :Partition between X & Y where Ì : Last element of Y ¦ : Does not equal XÌ : Last element of X Ã :End partition Ë :Map m : Map Î : First elements (card values) ¬ : Join ú5 : Right pad with spaces to length 5 á5 : Permutations of length 5 Ã :End map c :Flatten
Explanation
"AJQKA" :String literal
i1 :Insert at (0-based) index 1
Aò2 : Range [2,10]
q : Join
) :End insert
ø :Does that string contain any element in the following array?
U :Input
ñ :Sort
Ì : By last element (grouping suits together)
òÏ :Partition between X & Y where
Ì : Last element of Y
¦ : Does not equal
XÌ : Last element of X
à :End partition
Ë :Map
m : Map
Î : First elements (card values)
¬ : Join
ú5 : Right pad with spaces to length 5
á5 : Permutations of length 5
à :End map
c :Flatten