import type { categories } from '@wix/blog'; import { AsChildChildren } from '@wix/headless-utils/react'; import React from 'react'; import { type BlogCategoriesServiceConfig, type EnhancedCategory } from '../services/blog-categories-service.js'; import type { createCustomCategory } from '../services/helpers.js'; export interface BlogCategoriesRootProps { asChild?: boolean; className?: string; children: AsChildChildren<{ hasCategories: boolean; }> | React.ReactNode; /** Loaded result of `loadBlogCategoriesServiceConfig` */ blogCategoriesServiceConfig?: BlogCategoriesServiceConfig; /** Categories to use instead of loading from the service */ categories?: categories.Category[]; /** Custom categories to prepend to the real categories (e.g., "All posts"). @see {@link createCustomCategory} */ customCategoriesToPrepend?: ReturnType[]; /** Fallback image url to use when the category image is not available */ fallbackImageUrl?: string; } /** * Root container for blog categories that provides categories context to all child components. * Supports both real categories from the service and custom categories. * Follows Container Level pattern from architecture rules. * * @component * @example * ```tsx * import { Blog } from '@wix/blog/components'; * * function CategoryNavigation() { * return ( * * No categories found}> * * * * * * * * ); * } * ``` */ export declare const Root: React.ForwardRefExoticComponent>; export interface CategoryItemsProps { children: React.ReactNode; emptyState?: React.ReactNode; } /** * Container for the categories list with empty state support. * Follows List Container Level pattern from architecture rules. * * @component * @example * ```tsx * No categories found}> * * * * * ``` */ export declare const CategoryItems: React.ForwardRefExoticComponent>; export interface CategoryItemRepeaterProps { children: React.ReactNode; offset?: number; limit?: number; } /** * Repeater component that renders Category for each category. * Follows Repeater Level pattern from architecture rules. * Note: Repeater components do NOT support asChild as per architecture rules. * * @component * @example * ```tsx * * * * * * * * ``` */ export declare const CategoryItemRepeater: React.ForwardRefExoticComponent>; interface CategoryItemRepeaterContextValue { category: EnhancedCategory; imageUrl?: string; } export declare function useCategoryItemRepeaterContext(): CategoryItemRepeaterContextValue; export interface ActiveCategoryProps { asChild?: boolean; className?: string; /** The pathname of the current page */ pathname: string; baseUrl?: string; children: AsChildChildren<{ category: EnhancedCategory; }> | React.ReactNode; } /** * Component that finds and displays the currently active category. * Provides the active category through CategoryContext to its children. * * @component * @example * ```tsx * * {({ category }) => ( *
* *
* * *
*
* )} *
* ``` */ export declare const ActiveCategory: React.ForwardRefExoticComponent>; export {};