import * as react_jsx_runtime from 'react/jsx-runtime';
import * as react from 'react';
import { ReactNode } from 'react';

declare const workOsOrgIdBrand: unique symbol;
/** A WorkOS organization id (`org_...`) -- the auth identity for API/SSE/query keys. */
type WorkOsOrgId = string & {
    readonly [workOsOrgIdBrand]: true;
};

/**
 * Service context value exposed by ElevasisServiceProvider.
 * Provides a ready-to-use apiRequest function and organization state.
 *
 * For standalone usage (testing, embedding), use ElevasisServiceProvider directly.
 * For standard SDK usage, ElevasisUIProvider composes this automatically when apiUrl is provided.
 */
interface ElevasisServiceContextValue {
    apiRequest: <T>(endpoint: string, options?: RequestInit) => Promise<T>;
    /**
     * @deprecated Alias of `workOSOrganizationId` retained for existing query-key consumers.
     * Resolves to the WorkOS `org_xxx` id (NOT the Supabase UUID). Prefer `workOSOrganizationId`.
     */
    organizationId: WorkOsOrgId | null;
    /** WorkOS `org_xxx` id for the current organization. */
    workOSOrganizationId: WorkOsOrgId | null;
    isReady: boolean;
}
interface ElevasisServiceProviderProps {
    apiRequest: <T>(endpoint: string, options?: RequestInit) => Promise<T>;
    /** Organization ID alias retained for existing query-key consumers. */
    organizationId?: string | null;
    /** WorkOS `org_xxx` string for the current organization. */
    workOSOrganizationId?: string | null;
    isReady: boolean;
    children: ReactNode;
}

declare const ElevasisServiceContext: react.Context<ElevasisServiceContextValue | null>;

/**
 * Hook to access the ElevasisServiceProvider context.
 * Provides apiRequest, workOSOrganizationId, and isReady.
 *
 * Throws if used outside of an ElevasisServiceProvider or ElevasisUIProvider (with apiUrl).
 */
declare function useElevasisServices(): ElevasisServiceContextValue;
/**
 * Standalone service provider for testing, embedding, or advanced consumers.
 *
 * Accepts apiRequest, organizationId, and isReady directly as props.
 * ElevasisUIProvider composes this internally when apiUrl is provided.
 *
 * @example Testing
 * ```tsx
 * <ElevasisServiceProvider apiRequest={mockApiRequest} workOSOrganizationId="org-1" isReady={true}>
 *   <ComponentUnderTest />
 * </ElevasisServiceProvider>
 * ```
 *
 * @example Embedding
 * ```tsx
 * <ElevasisServiceProvider apiRequest={myFetcher} workOSOrganizationId={orgId} isReady={!!orgId}>
 *   <CommandQueuePanel />
 * </ElevasisServiceProvider>
 * ```
 */
declare function ElevasisServiceProvider({ apiRequest, organizationId, workOSOrganizationId, isReady, children }: ElevasisServiceProviderProps): react_jsx_runtime.JSX.Element;

export { ElevasisServiceContext, ElevasisServiceProvider, useElevasisServices };
