import type { ReactElement } from 'react'; import type { ExtensionPoints, RenderExtensionPoint, ApiForRenderExtension } from '@shopify/checkout-ui-extensions'; /** * Registers your React-based UI Extension to run for the selected extension point. * Additionally, this function will automatically provide the extension API as React * context, which you can access anywhere in your extension by using the `useApi()` * hook. * * @param target The extension point you are registering for. This extension * point must be a `RenderExtensionPoint`; if you are trying to register for a non- * rendering extension point, like `Checkout::PostPurchase::ShouldRender`, use the * `extension()` function provided by this library instead. * * @param render The function that will be called when Checkout begins rendering * your extension. This function is called with the API checkout provided to your * extension, and must return a React element that will be rendered into the extension * point you specified. */ export declare function reactExtension(target: ExtensionPoint, render: (api: ApiForRenderExtension) => ReactElement | Promise>): ExtensionPoints[ExtensionPoint]; /** * Registers your React-based UI Extension to run for the selected extension point. * Additionally, this function will automatically provide the extension API as React * context, which you can access anywhere in your extension by using the `useApi()` * hook. * * @param target The extension point you are registering for. This extension * point must be a `RenderExtensionPoint`; if you are trying to register for a non- * rendering extension point, like `Checkout::PostPurchase::ShouldRender`, use the * `extension()` function provided by this library instead. * * @param render The function that will be called when Checkout begins rendering * your extension. This function is called with the API checkout provided to your * extension, and must return a React element that will be rendered into the extension * point you specified. */ export declare function render(target: ExtensionPoint, render: (api: ApiForRenderExtension) => ReactElement): ExtensionPoints[ExtensionPoint]; export declare function extractComponentName(componentStack: string): string; //# sourceMappingURL=render.d.ts.map