Arun District Council could need to pay £18 million to the Littlehampton Harbour following a high court decision.