import { AsChildChildren } from '@wix/headless-utils/react'; import { PlanPaywallServiceConfig } from '../services/index.js'; import { PaywallData } from './core/PlanPaywall.js'; interface RootProps { children: React.ReactNode; planPaywallServiceConfig: PlanPaywallServiceConfig; } /** * Root component that provides plan paywall context to child components * * @component * @example * ```tsx * * * *
Paywalled content
*
* *
You need to buy a plan to access this content
*
* *
There was an error checking member access
*
*
*
* * ``` */ export declare const Root: ({ children, planPaywallServiceConfig }: RootProps) => import("react/jsx-runtime").JSX.Element; export type PlanPaywallData = PaywallData; interface PaywallProps { asChild?: boolean; children: AsChildChildren | React.ReactNode; loadingState?: React.ReactNode; } /** * Container for controlling access to the paywalled content. * * @component * @example * ```tsx * // Default usage * Loading...}> * *
Paywalled content
*
*
* * // With asChild * * {React.forwardRef(({isLoading, error, hasAccess}, ref) => { * if (isLoading) { * return loadingState; * } * * if (error) { * return
Error!
; * } * * if (hasAccess) { * return
Paywalled content
; * } * * return
You need to buy a plan to access this content
; * })} *
* ``` */ export declare const Paywall: ({ asChild, children, loadingState }: PaywallProps) => import("react/jsx-runtime").JSX.Element; interface RestrictedContentProps { children: React.ReactNode; } /** * Component that displays the restricted content if the member has access to the required plans. * * @component * @example * ```tsx * *
Paywalled content
*
* ``` */ export declare const RestrictedContent: ({ children }: RestrictedContentProps) => import("react/jsx-runtime").JSX.Element; interface FallbackProps { children: React.ReactNode; } /** * Component that displays the fallback content if the member does not have access to the required plans. * * @component * @example * ```tsx * *
Fallback content
*
* ``` */ export declare const Fallback: ({ children }: FallbackProps) => import("react/jsx-runtime").JSX.Element; interface ErrorComponentProps { asChild?: boolean; children: AsChildChildren<{ error: string; }> | React.ReactNode; className?: string; } /** * Component that displays the error content if there is an error checking member access * * @component * @example * ```tsx * // Default usage * * * // asChild * *
There was an error checking member access
*
* * // asChild with react component * * {React.forwardRef(({error, ...props}, ref) => ( *
* Error: {error} *
* ))} *
* ``` */ export declare const ErrorComponent: ({ asChild, children, className, }: ErrorComponentProps) => import("react/jsx-runtime").JSX.Element; export {};