/**
 * Label storage operations for PMO.
 * Handles CRUD for labels, label groups, and ticket-label associations.
 * Enforces group exclusivity constraints.
 */
import { Label, LabelFilter, LabelGroup, LabelGroupFilter } from '../types.js';
import { StorageContext } from './types.js';
export declare class LabelStorage {
    private ctx;
    constructor(ctx: StorageContext);
    listLabelGroups(filter?: LabelGroupFilter): Promise<LabelGroup[]>;
    getLabelGroup(id: string): Promise<LabelGroup | null>;
    getLabelGroupByName(name: string): Promise<LabelGroup | null>;
    createLabelGroup(group: Partial<LabelGroup> & {
        name: string;
    }): Promise<LabelGroup>;
    updateLabelGroup(id: string, changes: Partial<LabelGroup>): Promise<LabelGroup>;
    deleteLabelGroup(id: string): Promise<void>;
    listLabels(filter?: LabelFilter): Promise<Label[]>;
    getLabel(id: string): Promise<Label | null>;
    getLabelByName(name: string, groupId?: string): Promise<Label | null>;
    createLabel(label: Partial<Label> & {
        name: string;
    }): Promise<Label>;
    updateLabel(id: string, changes: Partial<Label>): Promise<Label>;
    deleteLabel(id: string): Promise<void>;
    /**
     * Add a label to a ticket.
     * Enforces group exclusivity: if the label belongs to an exclusive group,
     * removes any existing label from the same group first.
     */
    addLabelToTicket(ticketId: string, labelId: string): Promise<void>;
    /**
     * Remove a label from a ticket.
     */
    removeLabelFromTicket(ticketId: string, labelId: string): Promise<void>;
    /**
     * Get all labels for a ticket.
     */
    getLabelsForTicket(ticketId: string): Promise<Label[]>;
    /**
     * Add a label to a ticket by name.
     * Resolves the label name to an ID first.
     * If the label name matches a group:label pattern, resolves within that group.
     */
    addLabelToTicketByName(ticketId: string, labelName: string): Promise<void>;
    /**
     * Remove a label from a ticket by name.
     */
    removeLabelFromTicketByName(ticketId: string, labelName: string): Promise<void>;
    /**
     * Resolve a label by name or group:name pattern.
     */
    private resolveLabelByName;
}
