import React from 'react'; interface FeedbackRatingProps { /** Required: Unique identifier for the feature this feedback is associated with * Example: enrolment-reasons-sidebar */ featureId: string; /** Required: Product identifier to differentiate between different applications in the results * Example: LRS */ productId: string; /** * Required only when using the built-in Hub endpoint (i.e., when `token` is provided and `submitRating` is not). * Used as the x-api-key header for authenticating through AWS Gateway for the Hub feedback endpoint. * Example: 'abcd1234efgh5678ijkl9012mnop3456' */ apiKey?: string; /** * Auth token for Hub endpoint, if no token is provided then feedback won't be logged. * If not providing, please provide your own `submitRating` to handle Hub API */ token?: string; /** Optional callback invoked when the user selects a rating. * If provided, this overrides the built‑in Hub submission logic. */ submitRating?: (rating: number, featureId: string) => Promise | void; /** Optional message shown next to the rating control * Defaults to "We've made some changes. Share your feedback with a star rating." */ message?: React.ReactNode; /** * Optional user email to forward to the Hub endpoint (validated as an email by the API). */ email?: string; /** * Optional Base URL for the external feedback form (e.g., Google Form). * The component will append prefill parameters (rating, featureId, productId, pageUrl). * Defaults to DEFAULT_FEEDBACK_FORM_URL */ feedbackFormUrl?: string; /** * Optional Base URL for the Hub, used to build feedback links, so that an environment variable can be used in staging environments * Example: https://api.home-staging.learningpool.com/ * Note: must include trailing slash */ hubBaseUrl?: string; /** * Customer identifier required by the Hub endpoint when using the built-in submit. * If omitted, an empty string will be sent in the payload. Provide your own `submitRating` to override if you need custom logic. * Example: org-12345 */ customerId?: string; /** * Optional expiry for showing the component. * When the current time is beyond this timestamp, the component will render null and not show. * Accepts an ISO 8601 date-time string (e.g., '2026-03-01T00:00:00Z'). */ expiresAt?: string; /** * Optional page URL override used in payloads and links. If omitted, the component will use the current window location when available. */ pageUrl?: string; /** * Optional test id prefix to help with testing across apps */ testIdPrefix?: string; /** * Optional metadata object to include with the Hub payload. * Keys must be non-empty strings (<=255). Values may be string (<=255), number, or boolean. Max ~10 entries enforced server-side. */ metadata?: Record; } /** * A dismissible feedback bar with 5-star rating. * - Saves rating and dismiss state to localStorage, scoped by featureId * - Calls `submitRating` on star click (or a placeholder POST) * - After rating, shows a link to provide more feedback (opens in new tab) */ export default function FeedbackRating({ featureId, productId, apiKey, token, submitRating, message, email, feedbackFormUrl, hubBaseUrl, customerId, expiresAt, pageUrl, testIdPrefix, metadata }: FeedbackRatingProps): JSX.Element | null; export {};