Dynamic single-index model for functional data