import { type NixTemplate } from "@deijose/nix-js"; export type IslandDirective = "load" | "idle" | "visible" | "only"; export interface IslandComponent { (props: TProps): NixTemplate | null | false | undefined; } /** * Options for {@link island}. * * - `ssr`: Whether to execute the component on the server. Defaults to `true` * unless `directive === "only"` (then `false`). When `false`, the component * is never called during SSR; only `fallback` is rendered. * - `fallback`: HTML to render inside the island marker when SSR is skipped or * the component returns null/false. Accepts a `NixTemplate` (reactive, with * signals) or a plain string. Defaults to an empty string. */ export interface IslandOptions { ssr?: boolean; fallback?: NixTemplate | string; } /** * Renders a component to a static HTML string with island markers. * * @param name Unique island name used by the client entry to look up the module. * @param component Island component. Executed on the server unless `directive` * is `"only"` or `options.ssr` is `false`. * @param props Props passed to the component and serialized for hydration. * @param directive When to hydrate on the client. Use `"only"` to skip SSR * entirely (client-only island). * @param options SSR strategy and fallback content. * @returns A NixTemplate that renders the island placeholder. */ export declare function island(name: string, component: IslandComponent, props: TProps, directive?: IslandDirective, options?: IslandOptions): NixTemplate;