import { IkasBrandList } from "../../../storefront-models/src"; /** * Calculates the total number of pages in a brand list based on item count and page limit. * * @ai-category BrandList, Pagination * @ai-related hasBrandListPrevPage, hasBrandListNextPage, getBrandListPage * * @param list - The brand list instance to calculate page count for. * @returns The total number of pages, rounded up to the nearest integer. * * @example * ```typescript * import { getBrandListPageCount } from "@ikas/bp-storefront"; * * const totalPages = getBrandListPageCount(brandList); * console.log(`There are ${totalPages} pages of brands.`); * ``` */ export declare function getBrandListPageCount(list: IkasBrandList): number; /** * Checks whether the brand list is configured as a static list with manually selected brands. * * @ai-category BrandList, Listing * @ai-related getBrandListInitialData, getBrandListPageCount * * @param list - The brand list instance to check. * @returns True if the list type is "STATIC", false otherwise. * * @example * ```typescript * import { isBrandListStatic } from "@ikas/bp-storefront"; * * if (isBrandListStatic(brandList)) { * console.log("This list uses statically selected brands."); * } * ``` */ export declare function isBrandListStatic(list: IkasBrandList): boolean; /** * Determines whether a previous page of brands is available for loading. * * @ai-category BrandList, Pagination * @ai-related hasBrandListNextPage, getBrandListPrevPage, getBrandListPageCount * * @param list - The brand 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 { hasBrandListPrevPage } from "@ikas/bp-storefront"; * * if (hasBrandListPrevPage(brandList)) { * console.log("Previous page of brands is available."); * } * ``` */ export declare function hasBrandListPrevPage(list: IkasBrandList): boolean; /** * Determines whether a next page of brands is available for loading. * * @ai-category BrandList, Pagination * @ai-related hasBrandListPrevPage, getBrandListNextPage, getBrandListPageCount * * @param list - The brand list instance to check. * @returns True if there are more pages of brands beyond the current page, false if the list is static or at the last page. * * @example * ```typescript * import { hasBrandListNextPage } from "@ikas/bp-storefront"; * * if (hasBrandListNextPage(brandList)) { * console.log("More brands are available on the next page."); * } * ``` */ export declare function hasBrandListNextPage(list: IkasBrandList): boolean; /** * Fetches and populates the initial data for a brand list, handling both static and dynamic list types with sort support. * * @ai-category BrandList, Listing * @ai-related isBrandListStatic, getBrandListPageCount, getBrandListPage * * @param list - The brand 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 { getBrandListInitialData } from "@ikas/bp-storefront"; * * await getBrandListInitialData(brandList); * console.log("Brand list initialized:", brandList.data); * ``` */ export declare function getBrandListInitialData(list: IkasBrandList): Promise; /** * Loads the previous page of brands and prepends the results to the existing list data. * * @ai-category BrandList, Pagination * @ai-related getBrandListNextPage, hasBrandListPrevPage, getBrandListPage * * @param list - The brand 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 { getBrandListPrevPage } from "@ikas/bp-storefront"; * * await getBrandListPrevPage(brandList); * console.log("Previous page loaded:", brandList.data); * ``` */ export declare function getBrandListPrevPage(list: IkasBrandList): Promise; /** * Loads the next page of brands and appends the results to the existing list data. * * @ai-category BrandList, Pagination * @ai-related getBrandListPrevPage, hasBrandListNextPage, getBrandListPage * * @param list - The brand 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 { getBrandListNextPage } from "@ikas/bp-storefront"; * * await getBrandListNextPage(brandList); * console.log("Next page loaded:", brandList.data); * ``` */ export declare function getBrandListNextPage(list: IkasBrandList): Promise; /** * Navigates to a specific page of brands, replacing the current list data with the requested page. * * @ai-category BrandList, Pagination * @ai-related getBrandListPrevPage, getBrandListNextPage, getBrandListPageCount * * @param list - The brand 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 { getBrandListPage } from "@ikas/bp-storefront"; * * await getBrandListPage(brandList, 3); * console.log("Page 3 loaded:", brandList.data); * ``` */ export declare function getBrandListPage(list: IkasBrandList, page: number): Promise;