ASCII Airplane Banner Given two inputs -- one of them a non-empty printable ASCII string (including space, excluding newline), the other being one of two distinct, consistent values of your choice (1 / 0, l / r, left / right, etc.) -- output an ASCII art airplane banner of the string, pointing either left or right. For consistency, I'll be using left and right throughout this challenge description.

The plane is either |-DI&gt;-/ (left) or \-&lt;ID-| (right). Since the banner is clear, it consists of the input string's characters separated by spaces, either left-to-right (left) or right-to-left (right), and surrounded by a box of the shape

    /--/
---&lt;  &lt;
    \--\


or

\--\
 &gt;  &gt;---
/--/


Note there must be one space between the beginning/end of the message and the &gt;,&lt; characters.

For example, here is the message HAPPY BIRTHDAY! and the direction left:

           /-------------------------------/
|-DI&gt;-/---&lt; H A P P Y   B I R T H D A Y ! &lt;
           \-------------------------------\


Here is the message PPCG and the direction right. Note that the letters appear "backwards" when viewed from this side of the banner:

\---------\
 &gt; G C P P &gt;---\-&lt;ID-|
/---------/


Rules


Leading or trailing newlines or whitespace are all optional, so long as the characters themselves line up correctly.
Either a full program or a function are acceptable. If a function, you can return the output rather than printing it.
If possible, please include a link to an online testing environment so other people can try out your code!
Standard loopholes are forbidden.
This is code-golf so all usual golfing rules apply, and the shortest code (in bytes) wins.
JavaScript (ES6), 141 138 bytes

String and direction are input via currying syntax.'/\n|-DI&gt;-/---&lt; ' for left, '/\n|-DI&lt;-\\---&gt; ' for right.

t=&gt;p=&gt;(r=`${s='           '}/${_='-'.repeat(t.length*2+1)}${p}${[...t].join` `} ${d=p[12]} 
${s}\\${_}\\`,d&gt;'&lt;'?[...r].reverse().join``:r)




f=

t=&gt;p=&gt;(r=`${s='           '}/${_='-'.repeat(t.length*2+1)}${p}${[...t].join` `} ${d=p[12]} 
${s}\\${_}\\`,d&gt;'&lt;'?[...r].reverse().join``:r)

console.log(f('HAPPY BIRTHDAY!')('/\n|-DI&gt;-/---&lt; '))
console.log(f('HAPPY BIRTHDAY!')('/\n|-DI&lt;-\\---&gt; '))