/**
 * @license
 * Copyright 2026 Amodal Labs, Inc.
 * SPDX-License-Identifier: MIT
 */
export declare const STUDIO_SOURCE_SETTINGS_API_PATH = "/api/settings/source";
export declare const STUDIO_SOURCE_CONNECT_API_PATH = "/api/settings/source/connect";
export declare const STUDIO_SOURCE_DISCONNECT_API_PATH = "/api/settings/source/disconnect";
export type SourceConnectionMode = "local" | "cloud";
export type SourceConnectionProvider = "git" | "github";
export type SourceConnectionState = "connected" | "local" | "not_configured" | "error";
export type SourceConnectPresentation = "popup" | "redirect";
export interface SourceGitStatus {
    available: boolean;
    state: "clean" | "dirty" | "unknown";
    branch: string | null;
    commitSha: string | null;
    shortStatus: string[];
}
export interface SourceRepository {
    id: string;
    name: string;
    fullName: string;
    provider: SourceConnectionProvider;
    remoteUrl: string | null;
    defaultBranch: string | null;
    private: boolean | null;
}
export interface SourceRefInfo {
    repoPath: string | null;
    branch: string | null;
    ref: string | null;
    commitSha: string | null;
    remoteName: string | null;
    remoteUrl: string | null;
    defaultBranch: string | null;
    gitStatus: SourceGitStatus | null;
}
export interface SourceConnectionStatus {
    mode: SourceConnectionMode;
    provider: SourceConnectionProvider;
    state: SourceConnectionState;
    label: string;
    message: string;
    readOnly: boolean;
    cloudConnected: boolean;
    canConnect: boolean;
    canDisconnect: boolean;
}
export interface SourceSettings {
    connection: SourceConnectionStatus;
    source: SourceRefInfo;
    availableRepos: SourceRepository[];
}
export interface SourceConnectInput {
    presentation?: SourceConnectPresentation;
    installationId?: string;
    repositoryId?: string;
    branch?: string;
    returnTo?: string;
}
export type SourceSettingsOperation = {
    kind: "settings";
    settings: SourceSettings;
} | {
    kind: "initiate";
    presentation: SourceConnectPresentation;
    url: string;
    settings?: SourceSettings;
} | {
    kind: "unsupported";
    message: string;
    settings: SourceSettings;
};
export interface SourceSettingsResponse {
    settings?: SourceSettings;
    operation?: SourceSettingsOperation;
}
