What is the value of $x$ in the diagram?

[asy]
import olympiad;
draw((0,0)--(sqrt(3),0)--(0,sqrt(3))--cycle);
draw((0,0)--(-3,0)--(0,sqrt(3))--cycle);
label("8",(-3/2,sqrt(3)/2),NW);
label("$x$",(sqrt(3)/2,sqrt(3)/2),NE);
draw("$45^{\circ}$",(1.5,0),NW);
draw("$30^{\circ}$",(-2.45,0),NE);
draw(rightanglemark((0,sqrt(3)),(0,0),(sqrt(3),0),5));
[/asy]
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
What is the value of $x$ in the diagram?

[asy]
import olympiad;
draw((0,0)--(sqrt(3),0)--(0,sqrt(3))--cycle);
draw((0,0)--(-3,0)--(0,sqrt(3))--cycle);
label("8",(-3/2,sqrt(3)/2),NW);
label("$x$",(sqrt(3)/2,sqrt(3)/2),NE);
draw("$45^{\circ}$",(1.5,0),NW);
draw("$30^{\circ}$",(-2.45,0),NE);
draw(rightanglemark((0,sqrt(3)),(0,0),(sqrt(3),0),5));
[/asy]
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
4\sqrt{2}
What is the value of $x$ in the diagram?

[asy]
import olympiad;
draw((0,0)--(sqrt(3),0)--(0,sqrt(3))--cycle);
draw((0,0)--(-3,0)--(0,sqrt(3))--cycle);
label("8",(-3/2,sqrt(3)/2),NW);
label("$x$",(sqrt(3)/2,sqrt(3)/2),NE);
draw("$45^{\circ}$",(1.5,0),NW);
draw("$30^{\circ}$",(-2.45,0),NE);
draw(rightanglemark((0,sqrt(3)),(0,0),(sqrt(3),0),5));
[/asy]
train