import React from 'react';
import { type AsChildChildren } from '@wix/headless-utils/react';
import { type FaqEntry } from '../services/index.js';
/**
* Props for Faq Root component
*/
export interface FaqRootProps {
children: React.ReactNode;
faq: FaqEntry;
}
/**
* Root component that provides FAQ service context for rendering a single FAQ entry.
* Follows the services pattern like Product.Root does.
*
* @component
* @example
* ```tsx
* // Default usage
*
*
*
*
* ```
*/
export declare function Root(props: FaqRootProps): React.ReactNode;
/**
* Props for Faq Name component
*/
export interface NameProps {
/** Whether to render as a child component */
asChild?: boolean;
/** Custom render function when using asChild */
children?: AsChildChildren<{
question: string;
}>;
/** CSS classes to apply to the default element */
className?: string;
}
/**
* Displays the FAQ question/name.
*
* @component
* @example
* ```tsx
* // Default usage
*
*
* // asChild with primitive
*
*
*
*
* // asChild with react component
*
* {React.forwardRef(({question, ...props}, ref) => (
*
* Q: {question}
*
* ))}
*
* ```
*/
export declare const Name: React.ForwardRefExoticComponent>;
/**
* Props for Faq Item component
*/
export interface ItemProps {
/** Whether to render as a child component */
asChild?: boolean;
/** Custom render function when using asChild */
children?: AsChildChildren<{
id: string;
}>;
/** CSS classes to apply to the default element */
className?: string;
}
/**
* FAQ item wrapper component that provides access to the FAQ unique identifier.
*
* @component
* @example
* ```tsx
* // Default usage
*
*
* // asChild with AccordionItem
*
*
*
*
* // asChild with custom render function
*
* {React.forwardRef(({id, ...props}, ref) => (
*
* {children}
*
* ))}
*
* ```
*/
export declare const Item: React.ForwardRefExoticComponent>;
/**
* Props for Faq Answer component
*/
export interface AnswerProps {
/** Whether to render as a child component */
asChild?: boolean;
/** Custom render function when using asChild */
children?: AsChildChildren<{
answer: string;
}>;
/** CSS classes to apply to the default element */
className?: string;
}
/**
* Displays the FAQ answer.
*
* @component
* @example
* ```tsx
* // Default usage
*
*
* // asChild with primitive
*
*
*
*
* // asChild with react component
*
* {React.forwardRef(({answer, ...props}, ref) => (
*
* A: {answer}
*
* ))}
*
* ```
*/
export declare const Answer: React.ForwardRefExoticComponent>;