import React from 'react';
import type { Section } from '../services/types.js';
import { type AsChildChildren } from '@wix/headless-utils/react';
export interface SectionRootProps {
children: React.ReactNode;
section?: Section;
}
export interface SectionNameProps {
/** Whether to render as a child component */
asChild?: boolean;
/** Custom render function when using asChild */
children?: AsChildChildren<{
name: string;
}>;
/** CSS classes to apply to the default element */
className?: string;
}
export interface SectionDescriptionProps {
/** Whether to render as a child component */
asChild?: boolean;
/** Custom render function when using asChild */
children?: AsChildChildren<{
description: string;
}>;
/** CSS classes to apply to the default element */
className?: string;
}
export interface SectionItemsRepeaterProps {
children: React.ReactNode;
}
/**
* Root component that provides section context to its children.
*
* @warning Do not use this component directly if it's inside a repeater.
* Use the repeater component (e.g., Menu.SectionsRepeater) instead, which will
* automatically render this Root component for each section.
*/
export declare function Root(props: SectionRootProps): import("react/jsx-runtime").JSX.Element | null;
/**
* Displays the section name with customizable rendering following the documented API.
*
* @component
* @example
* ```tsx
* // Default usage
*
*
* // asChild with primitive
*
*
*
*
* // asChild with react component
*
* {React.forwardRef(({name, ...props}, ref) => (
*
* {name}
*
* ))}
*
* ```
*/
export declare const Name: React.ForwardRefExoticComponent>;
/**
* Displays the section description with customizable rendering following the documented API.
*
* @component
* @example
* ```tsx
* // Default usage
*
*
* // asChild with primitive
*
*
*
*
* // asChild with react component
*
* {React.forwardRef(({description, ...props}, ref) => (
*
* {description}
*
* ))}
*
* ```
*/
export declare const Description: React.ForwardRefExoticComponent>;
export declare const ItemsRepeater: React.ForwardRefExoticComponent>;
/**
* Section namespace containing all section components
* following the compound component pattern: SectionComponent.Root, SectionComponent.Name, SectionComponent.Description, etc.
*/
export declare const SectionComponent: {
/** Section root component */
readonly Root: typeof Root;
/** Section name component */
readonly Name: React.ForwardRefExoticComponent>;
/** Section description component */
readonly Description: React.ForwardRefExoticComponent>;
/** Section items repeater component */
readonly ItemsRepeater: React.ForwardRefExoticComponent>;
};