Depression & anxiety

Does it affect ttc? As in does it take people longer if they suffer from these