/**
 * @license
 * Copyright 2026 Amodal Labs, Inc.
 * SPDX-License-Identifier: MIT
 */
import type { DraftFile, PublishResult, PreviewResult } from '@/lib/types';
export declare class StudioFetchError extends Error {
    readonly status: number;
    constructor(status: number, message: string);
}
/** Public return shape for consumers. */
export interface UseDraftWorkspace {
    drafts: DraftFile[];
    count: number;
    isLoading: boolean;
    error: Error | null;
    getLatestError: () => Error | null;
    listDrafts: () => Promise<void>;
    saveDraft: (filePath: string, content: string) => Promise<void>;
    deleteDraft: (filePath: string) => Promise<void>;
    discardAll: () => Promise<void>;
    publish: (commitMessage: string) => Promise<PublishResult | null>;
    buildPreview: () => Promise<PreviewResult | null>;
}
export declare function useDraftWorkspace(): UseDraftWorkspace;
