import { type FormField, type FormState } from "./form.js"; export type RepoFieldKey = `repo:${number}`; export type FieldKey = RepoFieldKey | "branch" | "group" | "title"; export interface Field extends FormField { suggestions?: string[]; cycleIndex?: number; } export interface NewFormState extends FormState { groupTouched: boolean; knownCwds: string[]; worktreeEnabled: boolean; } export interface NewFormContext { cwd: string; group?: string; knownCwds?: string[]; additionalCwds?: string[]; titleGenerator?: () => string; } export declare function moveFocus(state: NewFormState, delta: number): NewFormState; export declare function setFocus(state: NewFormState, key: FieldKey): NewFormState; export declare function appendChar(state: NewFormState, char: string): NewFormState; export declare function backspace(state: NewFormState): NewFormState; export declare function deleteForward(state: NewFormState): NewFormState; export declare function moveCursor(state: NewFormState, delta: number): NewFormState; export declare function moveCursorHome(state: NewFormState): NewFormState; export declare function moveCursorEnd(state: NewFormState): NewFormState; export declare function moveCursorWordLeft(state: NewFormState): NewFormState; export declare function moveCursorWordRight(state: NewFormState): NewFormState; export declare function backspaceWord(state: NewFormState): NewFormState; export declare function deleteWord(state: NewFormState): NewFormState; export declare function createNewForm(ctx: NewFormContext): NewFormState; export declare function addRepo(state: NewFormState): NewFormState; export declare function removeFocusedRepo(state: NewFormState): NewFormState; export declare function cycleCwdSuggestion(state: NewFormState, delta: number): NewFormState; export declare function setRepoValue(state: NewFormState, key: RepoFieldKey, cwd: string): NewFormState; export declare function toggleWorktree(state: NewFormState): NewFormState; export interface ValidationResult { ok: boolean; state: NewFormState; } export declare function validateNewForm(state: NewFormState): ValidationResult; export interface NewFormSubmission { cwd: string; group: string; title: string; additionalCwds?: string[]; worktree?: { branch: string; }; } export declare function submission(state: NewFormState): NewFormSubmission; export declare function isRepoKey(key: FieldKey): key is RepoFieldKey; export declare function isPrimaryRepoKey(key: FieldKey): boolean;