import type { SitePublication, SitePublicationLink } from "@opengeni/contracts"; import type { OpenGeniBrowserClient } from "@opengeni/sdk/browser"; import type { DesktopBridge } from "@opengeni/sdk/desktop-bridge"; /** Where the Site's published address stands, from the API's answer. */ export type SitePublicationLinkLoad = { state: "loading"; } | { state: "unavailable"; } | { state: "forbidden"; } | { state: "none"; } | { state: "error"; error: unknown; } | { state: "ready"; link: SitePublicationLink; }; /** * The Site's published address, for anyone who can open the Site. `update` * shows a publication this page just changed without waiting for a read. */ export declare function useSitePublicationLink({ client, workspaceId, siteId, }: { client: Pick; workspaceId: string; siteId: string; }): { load: SitePublicationLinkLoad; update: (publication: Pick) => void; }; /** * Only the API's own "not published" answer means not published. Any other * 404 (an older API without this route, publishing off) shows nothing rather * than offering Publish for a Site that may be on the web. */ export declare function sitePublicationLinkLoadFromError(error: unknown): SitePublicationLinkLoad; /** The published address when the Site is on the web now, else null. */ export declare function publishedSiteLink(load: SitePublicationLinkLoad): { url: string; hostname: string; } | null; /** * Open the published Site. In the desktop app it opens in the default * browser through the shell and returns true; elsewhere it returns false so * the link opens its new tab itself. */ export declare function openPublishedSite(url: string, bridge?: Pick | null): boolean; export declare function SitePublicationControl({ load, canPublish, onOpenPublishing, openExternal, }: { load: SitePublicationLinkLoad; /** May publish the Site and change how it is published. */ canPublish: boolean; /** Open the publish form: to publish, or for a published Site's settings. */ onOpenPublishing: () => void; /** The desktop path; returns true when it handled the open. */ openExternal?: ((url: string) => boolean) | undefined; }): import("react").JSX.Element | null;