import react__default from 'react'; /** * Theming props for the Q&A Widget. * These map to CSS custom properties used internally. */ interface QAThemingProps { /** Primary accent color, e.g. "#228be6" */ qaPrimaryColor?: string; /** Container background color */ qaBackgroundColor?: string; /** Primary text color */ qaTextColor?: string; /** Secondary text color */ qaSecondaryTextColor?: string; /** Border color */ qaBorderColor?: string; /** Staff badge color */ qaStaffBadgeColor?: string; /** Accepted answer color */ qaAcceptedColor?: string; /** Title font size, e.g. "clamp(16px, 2vmin, 20px)" */ qaTitleSize?: string; /** Body font size */ qaBodySize?: string; /** Meta text font size */ qaMetaSize?: string; /** Font family */ qaFontFamily?: string; /** Card padding, e.g. "16px" */ qaCardPadding?: string; /** Gap between cards, e.g. "12px" */ qaCardGap?: string; /** Border radius, e.g. "8px" */ qaBorderRadius?: string; /** Card box shadow */ qaCardShadow?: string; /** Button border radius, e.g. "4px" */ qaButtonRadius?: string; /** Vote button size, e.g. "28px" */ qaVoteButtonSize?: string; } /** * Core configuration props for the Q&A Widget. */ interface QAWidgetProps extends QAThemingProps { /** Base URL of the Legion application (required) */ baseUrl: string; /** JWT auth token for authenticated features */ authToken?: string; /** Product ID to scope questions to a specific product */ productId?: string; /** Display name for the user. Default: "Anonymous" */ username?: string; /** Number of items per page. Default: 5 */ pageSize?: number; /** Theme preset. Default: "light" */ theme?: "light" | "dark"; /** Show search bar. Default: true */ showSearch?: boolean; /** Show the "Ask a Question" button. Default: true */ showAskButton?: boolean; /** Widget width CSS value. Default: "600px" */ width?: string; /** Widget height CSS value. Default: "800px" */ height?: string; /** Additional CSS class name for the container */ className?: string; /** Additional inline styles for the container */ style?: React.CSSProperties; /** Callback when the widget iframe has loaded */ onLoad?: (detail: { widget: string; theme: string; }) => void; /** Callback when the widget iframe fails to load */ onError?: (message: string) => void; } /** * Mapping from camelCase theming prop names to the kebab-case query * parameter names used by the Q&A widget iframe URL. */ declare const QA_THEMING_PROP_TO_PARAM: Record; /** * Ref handle exposed by LegionQA for imperative control. */ interface LegionQAHandle { /** Reload the widget iframe */ refresh: () => void; } /** * Build the iframe src URL from widget props. */ declare function buildQAWidgetUrl(props: QAWidgetProps): string; /** * LegionQA – a React component that embeds the Legion Q&A widget via an iframe. * * @example * ```tsx * import { LegionQA } from '@legionhandtech/lht-react-widgets'; * * function App() { * return ( * * ); * } * ``` */ declare const LegionQA: react__default.ForwardRefExoticComponent>; export { LegionQA, type LegionQAHandle, type QAThemingProps, type QAWidgetProps, QA_THEMING_PROP_TO_PARAM, buildQAWidgetUrl };