import type { Agent } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/api_pb";
import type { McpServer } from "@stigmer/protos/ai/stigmer/agentic/mcpserver/v1/api_pb";
import type { Workflow } from "@stigmer/protos/ai/stigmer/agentic/workflow/v1/api_pb";
/** Options for {@link useExportResource}. */
export interface UseExportResourceOptions {
    /** The resource kind — determines which serializer is used. */
    readonly kind: "Agent" | "McpServer" | "Workflow";
    /** The proto resource to export, or `null` when not yet loaded. */
    readonly resource: Agent | McpServer | Workflow | null;
}
/** Return value of {@link useExportResource}. */
export interface UseExportResourceReturn {
    /** Copy the resource as YAML to the clipboard (with toast feedback). */
    readonly copyYaml: () => Promise<void>;
    /** Copy the resource as JSON to the clipboard (with toast feedback). */
    readonly copyJson: () => Promise<void>;
    /** Download the resource as a `.yaml` file. */
    readonly downloadYaml: () => void;
    /** Download the resource as a `.json` file. */
    readonly downloadJson: () => void;
    /** The serialized YAML string, or `null` when the resource is not loaded. */
    readonly yaml: string | null;
    /** The serialized JSON string, or `null` when the resource is not loaded. */
    readonly json: string | null;
}
/**
 * Headless export hook for Stigmer resources (Agent, McpServer).
 *
 * Serializes the resource into YAML and JSON formats and provides
 * stable callbacks for copying to clipboard or triggering a file
 * download. All operations are client-side — no additional API calls.
 *
 * The serialized output uses the canonical Stigmer resource format
 * (`apiVersion`, `kind`, `metadata`, `spec`) with snake_case field
 * names, identical to what the CLI produces and what `parseResourceYaml`
 * accepts — ensuring full round-trip compatibility.
 *
 * @param options - Resource kind and the proto resource object.
 * @returns Stable callbacks and memoized serialized strings.
 *
 * @example
 * ```tsx
 * const { agent } = useAgent(org, slug);
 * const { copyYaml, downloadYaml } = useExportResource({
 *   kind: "Agent",
 *   resource: agent,
 * });
 *
 * <ActionMenu.Item onSelect={copyYaml}>Export YAML</ActionMenu.Item>
 * <ActionMenu.Item onSelect={downloadYaml}>Download YAML</ActionMenu.Item>
 * ```
 *
 * @see {@link serializeAgentYaml} for the underlying Agent serializer
 * @see {@link serializeMcpServerYaml} for the underlying McpServer serializer
 */
export declare function useExportResource({ kind, resource, }: UseExportResourceOptions): UseExportResourceReturn;
//# sourceMappingURL=useExportResource.d.ts.map