import react__default from 'react'; /** * Theming props for the Campaign Detail Widget. * These map to camelCase query params consumed by the iframe page. */ interface CampaignDetailThemingProps { /** Container background color */ detailBackgroundColor?: string; /** Primary text color */ detailTextColor?: string; /** Secondary text color */ detailSecondaryTextColor?: string; /** Border color */ detailBorderColor?: string; /** Container border radius, e.g. "12px" */ detailBorderRadius?: string; /** Container padding */ detailPadding?: string; /** Container box shadow */ detailShadow?: string; /** Primary accent color (CTAs, progress, links) */ detailPrimaryColor?: string; /** Primary hover color */ detailPrimaryHover?: string; /** Hero overlay color */ detailHeroOverlay?: string; /** Reward badge background */ detailRewardBg?: string; /** Reward badge text color */ detailRewardColor?: string; /** Task complete state color */ detailTaskCompleteColor?: string; /** Title font size, e.g. "1.5rem" */ detailTitleSize?: string; /** Title font weight */ detailTitleWeight?: string; /** Body text font size */ detailBodySize?: string; /** Font family */ detailFontFamily?: string; /** Button border radius */ detailButtonRadius?: string; /** Transition duration */ detailTransitionDuration?: string; } /** * Core configuration props for the Campaign Detail Widget. */ interface CampaignDetailWidgetProps extends CampaignDetailThemingProps { /** Campaign UUID (required) */ id: string; /** Base URL of the Legion application (required) */ baseUrl: string; /** API key / bearer token for authenticated mode */ apiKey?: string; /** Theme preset. Default: "light" */ theme?: "light" | "dark"; /** Widget height CSS value. Default: "auto" */ height?: string | number; /** 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; id: string; theme: string; }) => void; /** Callback when the widget iframe fails to load */ onError?: (message: string) => void; /** * Callback fired when the embedded view requests to close * (user clicks the in-widget close affordance, or completes the flow). * Hosts typically use this to close the modal that wraps the widget. */ onClose?: () => void; /** * Callback fired when the user successfully claims / begins the campaign. * Hosts can use this to refetch their campaign listing. */ onClaim?: (detail: { id: string; }) => void; /** * Callback fired when the embedded view requires the user to sign in * (e.g. they click "Claim Gift" / "Start Earning" without a valid token). * Hosts typically use this to open their own login UI, then push a fresh * `auth-token` back to the widget. */ onRequestLogin?: (detail: { id: string | null; }) => void; } /** * Mapping from camelCase theming prop names to the kebab-case query * parameter names used by the campaign detail widget iframe URL. */ declare const CAMPAIGN_DETAIL_THEMING_PROP_TO_PARAM: Record; /** * Ref handle exposed by LegionCampaignDetail for imperative control. */ interface LegionCampaignDetailHandle { /** Reload the widget iframe */ refresh: () => void; } /** * Build the iframe src URL from widget props. */ declare function buildCampaignDetailWidgetUrl(props: CampaignDetailWidgetProps): string; /** * LegionCampaignDetail – a React component that embeds the Legion * Campaign Detail widget via an iframe. Designed to be opened inside * a host-controlled modal: pair with `onClose` for dismissal. * * @example * ```tsx * import { LegionCampaignDetail } from '@legionhandtech/lht-react-widgets'; * * function App() { * const [open, setOpen] = useState(false); * const [campaignId, setCampaignId] = useState(null); * * return ( * setOpen(false)}> * {campaignId && ( * setOpen(false)} * /> * )} * * ); * } * ``` */ declare const LegionCampaignDetail: react__default.ForwardRefExoticComponent>; export { CAMPAIGN_DETAIL_THEMING_PROP_TO_PARAM, type CampaignDetailThemingProps, type CampaignDetailWidgetProps, LegionCampaignDetail, type LegionCampaignDetailHandle, buildCampaignDetailWidgetUrl };