/**
 * PMO Utility Functions
 */
/**
 * Convert a string to a URL-safe slug
 */
export declare function slugify(text: string): string;
/**
 * Format a date as ISO string (date only)
 */
export declare function formatDate(date: Date): string;
/**
 * Format a date as ISO timestamp
 */
export declare function formatTimestamp(date: Date): string;
/**
 * Parse an ISO date string
 */
export declare function parseDate(str: string): Date;
/**
 * Entity type prefixes for ID generation
 */
export declare const ENTITY_PREFIXES: {
    readonly ticket: "TKT";
    readonly epic: "EPIC";
    readonly spec: "SPEC";
    readonly project: "PROJ";
};
export type EntityType = keyof typeof ENTITY_PREFIXES;
/**
 * Database interface for ID generation (compatible with better-sqlite3)
 */
interface DatabaseLike {
    prepare(sql: string): {
        get(...params: unknown[]): unknown;
        run(...params: unknown[]): unknown;
    };
}
/**
 * Generate a sequential ID for an entity.
 *
 * Format: TKT-001, EPIC-001, SPEC-001, PROJ-001
 *
 * Uses pmo_settings table to track the next ID for each entity type.
 * IDs are zero-padded to 3 digits (001-999), then expand (1000+).
 *
 * Self-healing: If counter is behind MAX(id) in the table, auto-corrects.
 *
 * @param db - Database instance with prepare method
 * @param entityType - Type of entity (ticket, epic, spec, project)
 * @returns Generated ID like "TKT-001"
 */
export declare function generateEntityId(db: DatabaseLike, entityType: EntityType): string;
/**
 * Parsed entity ID components
 */
export interface ParsedEntityId {
    entityType: string;
    number: number;
    raw: string;
}
/**
 * Parse an entity ID into its components.
 *
 * Format: TKT-001 → { entityType: 'TKT', number: 1 }
 *
 * @param id - Entity ID to parse
 * @returns Parsed components, or null if invalid format
 */
export declare function parseEntityId(id: string): ParsedEntityId | null;
/**
 * Deep clone an object
 */
export declare function deepClone<T>(obj: T): T;
/**
 * Default column names for work commands (Linear-style workflow)
 *
 * Linear-style: Backlog → Planned → In Progress → Review → Done
 * - planned: Move tickets here when scheduled/assigned
 * - in_progress: Move tickets here when work starts
 * - review: Move tickets here when work is ready for review
 * - done: Move tickets here when work is complete (reviewed/merged)
 */
export declare const DEFAULT_WORK_COLUMNS: {
    readonly planned: "Planned";
    readonly in_progress: "In Progress";
    readonly review: "Review";
    readonly done: "Done";
};
export type WorkColumnType = keyof typeof DEFAULT_WORK_COLUMNS;
/**
 * Get a work column setting from pmo_settings with fallback to default.
 * Column matching is case-insensitive.
 *
 * Settings keys:
 * - column_in_progress: Column to move tickets to when work starts
 * - column_review: Column to move tickets to when work is ready for review
 * - column_done: Column to move tickets to when work is complete
 *
 * @param db - Database instance
 * @param columnType - Type of column (in_progress, review, done)
 * @returns The configured column name, or the default if not set
 */
export declare function getWorkColumnSetting(db: DatabaseLike, columnType: WorkColumnType): string;
/**
 * Set a work column setting in pmo_settings.
 *
 * @param db - Database instance
 * @param columnType - Type of column (in_progress, review, done)
 * @param columnName - Name of the column to use
 */
export declare function setWorkColumnSetting(db: DatabaseLike, columnType: WorkColumnType, columnName: string): void;
/**
 * Find a column by configured name (case-insensitive match).
 * Returns the actual column name from the board if found, null otherwise.
 *
 * @param columnNames - Array of column names from the board
 * @param targetColumn - The column name to find (from settings or default)
 * @returns The matching column name, or null if not found
 */
export declare function findColumnByName(columnNames: string[], targetColumn: string): string | null;
/**
 * Check if two arrays have the same elements (order-independent)
 */
export declare function arraysEqual<T>(a: T[], b: T[]): boolean;
/**
 * Default priority scale (backwards compatible with hardcoded P0-P3).
 */
export declare const DEFAULT_PRIORITIES: readonly ["P0", "P1", "P2", "P3"];
/**
 * Get the workspace priority scale from pmo_settings.
 * Returns the user-defined priority scale, or DEFAULT_PRIORITIES if not set.
 *
 * Priority values are ordered strings - position in array determines sort order.
 * Index 0 is highest priority.
 *
 * @param db - Database instance
 * @returns Array of priority strings ordered from highest to lowest
 */
export declare function getWorkspacePriorities(db: DatabaseLike): string[];
/**
 * Set the workspace priority scale in pmo_settings.
 *
 * @param db - Database instance
 * @param priorities - Array of priority strings ordered from highest to lowest
 */
export declare function setWorkspacePriorities(db: DatabaseLike, priorities: string[]): void;
/**
 * Check if a value is a valid priority for the workspace.
 *
 * @param db - Database instance
 * @param value - Value to check
 * @returns true if the value is in the workspace priority scale
 */
export declare function isValidWorkspacePriority(db: DatabaseLike, value: string): boolean;
/**
 * Get the sort index for a priority value.
 * Returns the position in the priority array (0 = highest priority).
 * Returns Infinity for unknown priorities (sorts last).
 *
 * @param db - Database instance
 * @param value - Priority value
 * @returns Sort index (lower = higher priority)
 */
export declare function getPrioritySortIndex(db: DatabaseLike, value: string | undefined | null): number;
export {};
