/**
 * @license
 * Copyright 2026 Amodal Labs, Inc.
 * SPDX-License-Identifier: MIT
 */
export type BranchMode = 'new' | 'existing';
export interface DeployDialogSubmit {
    branch: string;
    branchMode: BranchMode;
    commitMessage: string;
    /**
     * Whether to also promote the resulting deploy to production. The
     * caller decides what "promote" means — DeployDialog just collects
     * the choice. Always `false` when `showPromote` is false.
     */
    promote: boolean;
}
export interface DeployDialogProps {
    /** Modal title at the top of the dialog. Defaults to "Commit and deploy". */
    title?: string;
    /** Optional sub-line under the title (e.g. file count, source label). */
    subtitle?: string;
    /** Initial commit message. Required; empty string is allowed. */
    defaultCommitMessage: string;
    /** Initial branch name when `branchMode` starts as `'new'`. */
    defaultBranchName: string;
    /** Initial branch mode. Defaults to `'new'`. */
    defaultBranchMode?: BranchMode;
    /**
     * Branches that show up in the "existing" picker. Pass `[]` to hide
     * the New / Existing toggle and force `'new'` mode.
     */
    availableBranches?: readonly string[];
    /**
     * Show the Production / Non-production promote selector. Defaults to
     * true. Auth and other single-file commit flows can pass `false` if
     * they don't model a "promote" step.
     */
    showPromote?: boolean;
    /** Optional Review-diff button — hidden if omitted. */
    onReviewDiff?: () => void;
    /** Closes the modal without submitting. */
    onCancel: () => void;
    /** Submit handler. Resolves on success, rejects on failure. */
    onSubmit: (input: DeployDialogSubmit) => Promise<void>;
    /**
     * External busy flag — useful when the parent has additional in-flight
     * work (e.g. promote step) after the dialog's own submit returns.
     */
    externalBusy?: boolean;
    /** Pre-filled error to surface in the dialog footer. */
    externalError?: string | null;
}
/**
 * Normalize a free-form string to a valid git branch slug. Same rules
 * as the previous inline FileEditor implementation — lowercase, ascii,
 * `_./` collapsed to dashes, trailing dashes trimmed.
 */
export declare function slugifyBranch(value: string): string;
/**
 * Build a default branch name from a target file path. Same convention
 * as FileEditor: `studio/<basename-without-extension>` slugified.
 */
export declare function defaultBranchName(pathValue: string | null): string;
export declare function DeployDialog({ title, subtitle, defaultCommitMessage, defaultBranchName: initialBranchName, defaultBranchMode, availableBranches, showPromote, onReviewDiff, onCancel, onSubmit, externalBusy, externalError, }: DeployDialogProps): import("react/jsx-runtime").JSX.Element;
