Complex sentence: Both actors agreed to appear in "You Are the One" on the condition that they starred in it together, so the program design was decided only after both were confirmed in the leading roles.
Split into simpler sentences: Both actors agreed to appear in "You Are the One" on the condition that they worked together. As a result, the program design was decided only after both were confirmed in the leading roles.