/**
 * Draft management wrapper.
 *
 * Encapsulates the DraftInterface to provide a clean internal API
 * for managing draft file operations within the AppShell.
 * External consumers (tools) should not interact with this directly.
 */
/**
 * Manages draft file operations.
 *
 * This class wraps the DraftInterface to provide a simplified API
 * for the AppShell filesystem operations. It handles all draft
 * creation, deletion, and query operations internally.
 */
export class DraftManager {
    draftInterface;
    constructor(draftInterface) {
        this.draftInterface = draftInterface;
    }
    /**
     * Creates a draft file with the given content.
     *
     * This stages a file write that can be committed or discarded.
     * Parent directories are created automatically.
     *
     * @param filePath - Relative path of the file
     * @param content - Content to write
     */
    async createDraft(filePath, content) {
        await this.draftInterface.createDraftFile(filePath, content);
    }
    /**
     * Creates a draft marker without content.
     *
     * Used to mark a file as having a pending draft without
     * specifying the content immediately.
     *
     * @param filePath - Relative path of the file
     */
    async createDraftMarker(filePath) {
        await this.draftInterface.createDraftMarkerOnly(filePath);
    }
    /**
     * Creates a draft deletion for a file.
     *
     * This stages a file deletion that can be committed or discarded.
     *
     * @param filePath - Relative path of the file to delete
     */
    async createDraftDelete(filePath) {
        await this.draftInterface.createDraftDelete(filePath);
    }
    /**
     * Checks if there are any pending draft changes.
     *
     * @returns true if there are uncommitted draft changes
     */
    async hasDraftChanges() {
        return await this.draftInterface.hasLocalDraftChanges();
    }
    /**
     * Gets a unified diff of pending draft changes.
     *
     * @param paths - Optional specific paths to diff. If empty, diffs all changes.
     * @returns Unified diff string
     */
    async getDraftDiff(paths) {
        return await this.draftInterface.getDraftDiff(paths ?? []);
    }
    /**
     * Gets categorized draft changes.
     *
     * @returns Object containing arrays of edited, added, and deleted paths
     */
    async getDraftChanges() {
        return await this.draftInterface.getDraftChanges();
    }
    /**
     * Gets the underlying DraftInterface.
     *
     * This should only be used for advanced operations that require
     * direct access to the draft interface. Prefer using the methods
     * on this class when possible.
     *
     * @internal
     */
    getInterface() {
        return this.draftInterface;
    }
}
//# sourceMappingURL=draft-manager.js.map