import { IkasCategoryList } from "../../../storefront-models/src"; /** * Calculates the total number of pages in a category list based on item count and page limit. * * @ai-category CategoryList, Pagination * @ai-related hasCategoryListPrevPage, hasCategoryListNextPage, getCategoryListPage * * @param list - The category list instance to calculate page count for. * @returns The total number of pages, rounded up to the nearest integer. * * @example * ```typescript * import { getCategoryListPageCount } from "@ikas/bp-storefront"; * * const totalPages = getCategoryListPageCount(categoryList); * console.log(`There are ${totalPages} pages of categories.`); * ``` */ export declare function getCategoryListPageCount(list: IkasCategoryList): number; /** * Checks whether the category list is configured as a static list with manually selected categories. * * @ai-category CategoryList, Listing * @ai-related getCategoryListInitialData, getCategoryListPageCount * * @param list - The category list instance to check. * @returns True if the list type is "STATIC", false otherwise. * * @example * ```typescript * import { isCategoryListStatic } from "@ikas/bp-storefront"; * * if (isCategoryListStatic(categoryList)) { * console.log("This list uses statically selected categories."); * } * ``` */ export declare function isCategoryListStatic(list: IkasCategoryList): boolean; /** * Determines whether a previous page of categories is available for loading. * * @ai-category CategoryList, Pagination * @ai-related hasCategoryListNextPage, getCategoryListPrevPage, getCategoryListPageCount * * @param list - The category list instance to check. * @returns True if there is a previous page available, false if the list is static or already at the first page. * * @example * ```typescript * import { hasCategoryListPrevPage } from "@ikas/bp-storefront"; * * if (hasCategoryListPrevPage(categoryList)) { * console.log("Previous page of categories is available."); * } * ``` */ export declare function hasCategoryListPrevPage(list: IkasCategoryList): boolean; /** * Determines whether a next page of categories is available for loading. * * @ai-category CategoryList, Pagination * @ai-related hasCategoryListPrevPage, getCategoryListNextPage, getCategoryListPageCount * * @param list - The category list instance to check. * @returns True if there are more pages of categories beyond the current page, false if the list is static or at the last page. * * @example * ```typescript * import { hasCategoryListNextPage } from "@ikas/bp-storefront"; * * if (hasCategoryListNextPage(categoryList)) { * console.log("More categories are available on the next page."); * } * ``` */ export declare function hasCategoryListNextPage(list: IkasCategoryList): boolean; /** * Fetches and populates the initial data for a category list, handling both static and dynamic list types with sort support. * * @ai-category CategoryList, Listing * @ai-related isCategoryListStatic, getCategoryListPageCount, getCategoryListPage * * @param list - The category list instance to initialize with data from the API. * @returns A promise that resolves when the initial data has been loaded and assigned to the list. * * @example * ```typescript * import { getCategoryListInitialData } from "@ikas/bp-storefront"; * * await getCategoryListInitialData(categoryList); * console.log("Category list initialized:", categoryList.data); * ``` */ export declare function getCategoryListInitialData(list: IkasCategoryList): Promise; /** * Loads the previous page of categories and prepends the results to the existing list data. * * @ai-category CategoryList, Pagination * @ai-related getCategoryListNextPage, hasCategoryListPrevPage, getCategoryListPage * * @param list - The category list instance to load the previous page for. * @returns A promise that resolves when the previous page data has been prepended, or returns immediately if the list is static, already loading, or has no previous page. * * @example * ```typescript * import { getCategoryListPrevPage } from "@ikas/bp-storefront"; * * await getCategoryListPrevPage(categoryList); * console.log("Previous page loaded:", categoryList.data); * ``` */ export declare function getCategoryListPrevPage(list: IkasCategoryList): Promise; /** * Loads the next page of categories and appends the results to the existing list data. * * @ai-category CategoryList, Pagination * @ai-related getCategoryListPrevPage, hasCategoryListNextPage, getCategoryListPage * * @param list - The category list instance to load the next page for. * @returns A promise that resolves when the next page data has been appended, or returns immediately if the list is static, already loading, or has no next page. * * @example * ```typescript * import { getCategoryListNextPage } from "@ikas/bp-storefront"; * * await getCategoryListNextPage(categoryList); * console.log("Next page loaded:", categoryList.data); * ``` */ export declare function getCategoryListNextPage(list: IkasCategoryList): Promise; /** * Navigates to a specific page of categories, replacing the current list data with the requested page. * * @ai-category CategoryList, Pagination * @ai-related getCategoryListPrevPage, getCategoryListNextPage, getCategoryListPageCount * * @param list - The category list instance to navigate. * @param page - The page number to load. * @returns A promise that resolves when the specified page data has been loaded, or returns immediately if the list is static or already loading. * * @example * ```typescript * import { getCategoryListPage } from "@ikas/bp-storefront"; * * await getCategoryListPage(categoryList, 3); * console.log("Page 3 loaded:", categoryList.data); * ``` */ export declare function getCategoryListPage(list: IkasCategoryList, page: number): Promise;