import type { CardProvider } from '../types'

export interface WorkTrackerProvider {
  readonly kind: CardProvider
  readonly label: string

  createCard(title: string, description: string): Promise<string>
  updateDescription(cardId: string, description: string): Promise<void>
  addComment(cardId: string, text: string): Promise<void>
  getLastComment(cardId: string): Promise<string | null>
  isValidCardId(cardId: string): boolean
  normalizeCardId(cardId: string): string
  cardUrl(cardId: string): string | null
}

export interface RepoProvider {
  readonly kind: 'bitbucket' | 'github' | 'git'
  readonly label: string

  ensureRemoteBranch(branch: string): Promise<void>
  createPullRequest?(
    branch: string,
    title: string,
    body: string,
    draft?: boolean,
  ): Promise<{ number: number; url: string }>
}
