import APIClient
import Foundation

public extension CommentsClientV2 {
    /*
        These should be changed together

        infiniteScrollMarkerOffset is how many from the last
        element in the loaded comments should I retrigger a request

        So if I loaded 2 pages of a thread that has 1000 comments at a page size of 25 comments per page
        with an infiniteScrollMarkerOffset of 5

        the appearing index that would make cause a retrigger would be
        (<loaded-page-count> * <pageSize>) - <infiniteScrollMarkerOffset> = <trigger-index>
        (2 * 25) - 5 = 45

        * Note *
        requests are only made once per reaching trigger so if you reach the trigger
        and there are no more pages to load the loadPage function will not be retriggered
        if the trigger is hit again

     */
    static var infiniteScrollMarkerOffset: Int { 5 }
    static var pageSize: Int { 20 }
    static var replyPageSize: Int { 10 }
    static var sortOrder: CommentsSheetPage.CommentsSortOrder { .newest }
    static var commentLengthLimit: Int { 512 }
}
