/**
 * PMO Interface Types
 *
 * Canonical interface for the Project Management Orchestration system.
 * All storage backends must implement the PMOStorage interface.
 *
 * Hierarchy:
 * - Initiative (optional) - OKR-level grouping
 * - Project - Discrete effort with its own board + specs
 * - Epic (optional) - Large body of work within a project
 * - Ticket - Individual work item
 * - Subtask - Smallest actionable piece
 */
/**
 * Default priority values as a const array.
 * @deprecated Use getWorkspacePriorities() from utils.ts instead for runtime priority resolution.
 * This constant is kept for backwards compatibility and as the default when no workspace scale is set.
 */
export const PRIORITIES = ['P0', 'P1', 'P2', 'P3'];
/**
 * Default priority display names for UI presentation.
 * @deprecated Priority labels are derived from the workspace priority scale.
 * For user-defined priorities, the label IS the priority value.
 */
export const PRIORITY_LABELS = {
    P0: 'P0 - Critical',
    P1: 'P1 - High',
    P2: 'P2 - Medium',
    P3: 'P3 - Low',
};
/**
 * Mapping from legacy priority values to new P0-P3 format.
 */
export const LEGACY_PRIORITY_MAP = {
    URGENT: 'P0',
    HIGH: 'P1',
    MEDIUM: 'P2',
    LOW: 'P3',
};
/**
 * Ticket categories for classification.
 */
export const TICKET_CATEGORIES = [
    'feature',
    'bug',
    'refactor',
    'docs',
    'test',
    'chore',
    'performance',
    'ci',
    'build',
    'security',
    'database',
    'release',
    'adhoc',
];
/**
 * Check if a string is a valid Priority value.
 */
export function isValidPriority(value) {
    if (!value)
        return false;
    return PRIORITIES.includes(value);
}
/**
 * Check if a string is a legacy priority value.
 */
export function isLegacyPriority(value) {
    if (!value)
        return false;
    return value in LEGACY_PRIORITY_MAP;
}
/**
 * Normalize a priority value to the new P0-P3 format.
 * Converts legacy values (URGENT/HIGH/MEDIUM/LOW) to P0-P3.
 * Returns undefined for invalid values.
 */
export function normalizePriority(value) {
    if (!value)
        return undefined;
    // Already in new format
    if (isValidPriority(value)) {
        return value;
    }
    // Convert from legacy format
    if (isLegacyPriority(value)) {
        return LEGACY_PRIORITY_MAP[value];
    }
    // Unknown value
    return undefined;
}
/**
 * State category order for sorting columns/statuses
 */
export const STATE_CATEGORY_ORDER = [
    'triage',
    'backlog',
    'unstarted',
    'started',
    'completed',
    'canceled',
];
export class PMOError extends Error {
    code;
    ticketId;
    constructor(code, message, ticketId) {
        super(message);
        this.code = code;
        this.ticketId = ticketId;
        this.name = 'PMOError';
    }
}
//# sourceMappingURL=types.js.map