The decision is a big blow to President Trump’s trade policies but is likely to be appealed to the Supreme Court.