/**
 * Ticket Provider Resolver
 *
 * Determines which provider should handle ticket operations based on the
 * ticket's external source metadata or workspace configuration.
 *
 * Two resolution modes:
 * 1. Ticket-level: resolveTicketProvider() — for operations on a specific ticket
 *    (move, delete). Uses the ticket's metadata to find the source of truth.
 *
 * 2. Project-level: resolveProjectProvider() — for operations that aren't
 *    ticket-specific (list, create). Uses workspace config to determine
 *    the active provider.
 */
import type Database from 'better-sqlite3';
import type { TicketProvider, ProviderStorage } from './types.js';
/**
 * Resolve the correct provider for a given ticket.
 *
 * Uses the ticket's metadata to determine the source of truth:
 * - external_source = 'linear' + configured + inbound/bidirectional → Linear
 * - Otherwise → PMO
 *
 * @param ticketId - The PMO ticket ID
 * @param projectId - The PMO project ID
 * @param db - Database handle for config/mapping lookups
 * @param storage - Storage for fallback and local sync
 * @param metadata - Ticket metadata (contains external_source, etc.)
 * @returns The appropriate TicketProvider for this ticket
 */
export declare function resolveTicketProvider(ticketId: string, projectId: string, db: Database.Database, storage: ProviderStorage, metadata?: Record<string, string> | null): TicketProvider;
/**
 * Resolve the correct provider for project-level operations (list, create).
 *
 * Unlike resolveTicketProvider, this doesn't require a specific ticket.
 * It checks workspace configuration to determine the active provider.
 *
 * @param db - Database handle for config lookups
 * @param storage - Storage instance
 * @param projectId - The PMO project ID
 * @param source - Optional source hint ('pmo', 'linear', or 'auto')
 * @returns The appropriate TicketProvider
 */
export declare function resolveProjectProvider(db: Database.Database, storage: ProviderStorage, projectId: string, source?: string): TicketProvider;
