modules.nextPage=function(s)return function(d)if s.isAnimating then return end local h=s.state.selectedIndex+d if h>#s.props.images then h-=#s.props.images end s.setCurrentIndex(h,-d)end end
--[[
	Navigates to the next page.
]]
modules.nextPage = function(self)
	return function(pageSize)
		if self.isAnimating then
			return
		end

		local nextIndex = self.state.selectedIndex + pageSize
		if nextIndex > #self.props.images then
			nextIndex -= #self.props.images
		end

		self.setCurrentIndex(nextIndex, -pageSize)
	end
end
