In this challenge, you will be given a text block, and you need to perform reflection on the text.

Input:
======

1. A string to be reflected. The text may *not* be supplied as an array whose elements are the lines of text. For example, `"ab\ncd"` and `['a','b','\n','c','d']` are allowed, but `['ab','cd']` or `[['a','b'],['c','d']]` are not. You can assume that all of the lines have the same number of characters (padded with whitespace where needed).
2. A boolean where `True` indicates Y reflection and `False` indicates X reflection

The two inputs can be passed in any order.

Output:
=======

The reflected string. The characters do not change, only their position. The resulting image block should be aligned to the top left (the first row and column must each contain a non-whitespace character). Trailing whitespace (on any of the lines) is allowed.

Test cases:
===========

```
False
  o /
--|/
  |
 / \

/ o
 /|--
  |
 \ /

```

---

```
True
  o /
--|/
  |
 / \

 / \
  |
--|/
  o /

```

---

```
True
text

text

```

---

```
False
text

txet

```

---

```
True
P
P
C
G

G
C
P
P

```

---

```
False
P
P
C
G

P
P
C
G

```

---

```
True
abcde
fghij
kl mn
opqrs
tuvwx

tuvwx
opqrs
kl mn
fghij
abcde

```

This is a [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so answer with the shortest answer in your favorite language!