/**
 * GitLab implementation of GitProvider
 *
 * Delegates each operation to the corresponding function in
 * issue.ts and pr.ts. This class is the single place that binds
 * the GitProvider contract to the GitLab/glab-CLI implementation.
 */
import { checkGlabCli } from './utils.js';
import { fetchIssue, listOpenIssues, createIssue } from './issue.js';
import { findExistingMr, commentOnMr, closeMr, createMergeRequest, fetchMrReviewComments, listOpenMrs, mergeMr } from './pr.js';
export class GitLabProvider {
    checkCliStatus(cwd) {
        return checkGlabCli(cwd ?? process.cwd());
    }
    fetchIssue(issueNumber, cwd) {
        return fetchIssue(issueNumber, cwd ?? process.cwd());
    }
    createIssue(options, cwd) {
        return createIssue(options, cwd ?? process.cwd());
    }
    fetchPrReviewComments(prNumber, cwd) {
        return fetchMrReviewComments(prNumber, cwd ?? process.cwd());
    }
    listOpenIssues(cwd) {
        return listOpenIssues(cwd ?? process.cwd());
    }
    listOpenPrs(cwd) {
        return listOpenMrs(cwd ?? process.cwd());
    }
    findExistingPr(branch, cwd) {
        return findExistingMr(branch, cwd ?? process.cwd());
    }
    createPullRequest(options, cwd) {
        return createMergeRequest(options, cwd ?? process.cwd());
    }
    commentOnPr(prNumber, body, cwd) {
        return commentOnMr(prNumber, body, cwd ?? process.cwd());
    }
    closePr(prNumber, cwd) {
        return closeMr(prNumber, cwd ?? process.cwd());
    }
    mergePr(prNumber, cwd) {
        return mergeMr(prNumber, cwd ?? process.cwd());
    }
}
//# sourceMappingURL=GitLabProvider.js.map