import type { ReactNode } from "react"; import { type ServerContext } from "../hooks/useServerContext.js"; export interface JahiaComponent { /** The ID of the component (autogenerated but can be overridden) */ id?: string; /** * The name of the component. * * @default "default" */ name?: string; /** The display name of the component (in jahia's UI), optional. */ displayName?: string; /** The type of the component. */ componentType: "template" | "view"; /** The content node type the component applies to. */ nodeType: string; /** * The priority of the components in case multiple templates/views are applicable to a given * resource. The component with the highest priority has precedence over the other components. * * @default 0 */ priority?: number; /** Properties to add on the component, optional. */ properties?: Record; } /** * Defines and registers a Jahia component into the global registry as a view. * * @param id The ID of the component (autogenerated but can be overridden) * @param definitions The definitions of the component * @param Component The component to register */ export declare const jahiaComponent: ReactNode>({ id, ...definitions }: JahiaComponent, Component: T) => T;