import * as react from 'react'; /** * Theming props for the Community Posts Widget. * These map to CSS custom properties used internally. */ interface CommunityPostsThemingProps { /** Primary color */ postsPrimaryColor?: string; /** Container background color */ postsBackgroundColor?: string; /** Primary text color */ postsTextColor?: string; /** Secondary text color */ postsSecondaryTextColor?: string; /** Border color */ postsBorderColor?: string; /** Card background */ postsCardBg?: string; /** Card border radius */ postsCardRadius?: string; /** Card box shadow */ postsCardShadow?: string; /** Card padding */ postsCardPadding?: string; /** Avatar size */ postsAvatarSize?: string; /** Avatar border radius */ postsAvatarRadius?: string; /** Post title font size */ postsTitleSize?: string; /** Post title font weight */ postsTitleWeight?: string; /** Post body font size */ postsBodySize?: string; /** Meta text font size */ postsMetaSize?: string; /** Font family */ postsFontFamily?: string; /** Gap between posts */ postsGap?: string; /** Tag background */ postsTagBg?: string; /** Tag text color */ postsTagColor?: string; /** Tag border radius */ postsTagRadius?: string; /** Action button background */ postsActionBg?: string; /** Action button text color */ postsActionColor?: string; /** Action button hover background */ postsActionHoverBg?: string; /** Like button color */ postsLikeColor?: string; /** Transition duration */ postsTransitionDuration?: string; } /** * Core configuration props for the Community Posts Widget. */ interface CommunityPostsWidgetProps extends CommunityPostsThemingProps { /** Base URL of the Legion application (required) */ baseUrl: string; /** JWT auth token for authenticated features */ authToken?: string; /** Number of posts per page (5-50). Default: 10 */ pageSize?: number; /** Filter mode. Default: "recent" */ filter?: "recent" | "popular" | "unanswered"; /** Channel/group ID to filter posts */ channelId?: string; /** Show filter bar. Default: true */ showFilters?: boolean; /** Show action buttons (like, comment). Default: true */ showActions?: boolean; /** Current user ID */ userId?: string; /** Current username */ username?: string; /** Theme preset. Default: "light" */ theme?: "light" | "dark"; /** Widget height CSS value. Default: "800px" */ height?: string; /** Widget width CSS value. Default: "100%" */ width?: 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 kebab-case query params. */ declare const POSTS_THEMING_PROP_TO_PARAM: Record; /** * Ref handle exposed by LegionCommunityPosts for imperative control. */ interface LegionCommunityPostsHandle { /** Reload the widget iframe */ refresh: () => void; } /** * Build the iframe src URL from widget props. */ declare function buildCommunityPostsWidgetUrl(props: CommunityPostsWidgetProps): string; /** * LegionCommunityPosts – a React component that embeds the Legion * Community Posts widget via an iframe. * * Supports postMessage authentication for features like liking and commenting. */ declare const LegionCommunityPosts: react.ForwardRefExoticComponent>; export { type CommunityPostsThemingProps, type CommunityPostsWidgetProps, LegionCommunityPosts, type LegionCommunityPostsHandle, POSTS_THEMING_PROP_TO_PARAM, buildCommunityPostsWidgetUrl };