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)--(-1,0)--(0,sqrt(3))--cycle);
label("2",(-1/2,sqrt(3)/2),NW);
label("$x$",(sqrt(3)/2,sqrt(3)/2),NE);
draw("$45^{\circ}$",(1.5,0),NW);
draw("$60^{\circ}$",(-0.9,0),NE);
draw(rightanglemark((0,sqrt(3)),(0,0),(sqrt(3),0),4));
[/asy]
First, we label the diagram:

[asy]
import olympiad;
draw((0,0)--(sqrt(3),0)--(0,sqrt(3))--cycle);
draw((0,0)--(-1,0)--(0,sqrt(3))--cycle);
label("2",(-1/2,sqrt(3)/2),NW);
label("$x$",(sqrt(3)/2,sqrt(3)/2),NE);
draw("$45^{\circ}$",(1.5,0),NW);
draw("$60^{\circ}$",(-0.9,0),NE);
draw(rightanglemark((0,sqrt(3)),(0,0),(sqrt(3),0),4));
label("$A$",(0,0),S);
label("$B$",(-1,0),W);
label("$C$",(sqrt(3),0),E);
label("$D$",(0,sqrt(3)),N);
[/asy]

Triangle $ABD$ is a 30-60-90 triangle, so $AB = BD/2 = 1$ and $AD = AB\sqrt{3} = \sqrt{3}$.

Triangle $ACD$ is a 45-45-90 triangle, so $CD = AC \sqrt{2} = \sqrt{3}\cdot \sqrt{2} = \boxed{\sqrt{6}}$.