import { IssueRepository } from "../repository/Issue.repository";
import { IIssueDocument } from "../models/Issue.model";
import { CreateIssueData, UpdateIssueData, AddCommentData, IssueStatus, IssuePriority, IssuesCategory, EntityType } from "../../../types/issue.types";
import { IssueBuilder } from "../entities/IssueBuilder";
export declare class IssueService {
    private readonly issueRepository;
    constructor(issueRepository: IssueRepository);
    /**
     * Create a readiness issue using IssueBuilder
     */
    createReadinessIssue(propertyId: string, title: string, description: string, createdBy: string, entityId?: string, entityType?: EntityType, assignedTo?: string, dueDate?: Date): Promise<IIssueDocument>;
    /**
     * Create an operations issue using IssueBuilder
     */
    createOperationsIssue(propertyId: string, title: string, description: string, createdBy: string, entityId?: string, entityType?: EntityType, assignedTo?: string, dueDate?: Date): Promise<IIssueDocument>;
    /**
     * Create a security issue using IssueBuilder
     */
    createSecurityIssue(propertyId: string, title: string, description: string, createdBy: string, entityId?: string, entityType?: EntityType, assignedTo?: string, dueDate?: Date): Promise<IIssueDocument>;
    /**
     * Create an energy issue using IssueBuilder
     */
    createEnergyIssue(propertyId: string, title: string, description: string, createdBy: string, entityId?: string, entityType?: EntityType, assignedTo?: string, dueDate?: Date): Promise<IIssueDocument>;
    /**
     * Create a device-specific issue using IssueBuilder
     */
    createDeviceIssue(deviceId: string, propertyId: string, title: string, description: string, createdBy: string, category?: IssuesCategory, priority?: IssuePriority, assignedTo?: string, dueDate?: Date): Promise<IIssueDocument>;
    /**
     * Create a hub-specific issue using IssueBuilder
     */
    createHubIssue(hubId: string, propertyId: string, title: string, description: string, createdBy: string, category?: IssuesCategory, priority?: IssuePriority, assignedTo?: string, dueDate?: Date): Promise<IIssueDocument>;
    /**
     * Create a user-specific issue using IssueBuilder
     */
    createUserIssue(userId: string, propertyId: string, title: string, description: string, createdBy: string, category?: IssuesCategory, priority?: IssuePriority, assignedTo?: string, dueDate?: Date): Promise<IIssueDocument>;
    /**
     * Create a maintenance issue using IssueBuilder
     */
    createMaintenanceIssue(propertyId: string, title: string, description: string, createdBy: string, entityId?: string, entityType?: EntityType, assignedTo?: string, dueDate?: Date): Promise<IIssueDocument>;
    /**
     * Create an urgent issue using IssueBuilder
     */
    createUrgentIssue(propertyId: string, title: string, description: string, createdBy: string, entityId?: string, entityType?: EntityType, assignedTo?: string, dueDate?: Date): Promise<IIssueDocument>;
    /**
     * Create a new issue with business logic validation
     * Accepts either a CreateIssueData object or an IssueBuilder instance
     */
    createIssue(issueData: CreateIssueData | IssueBuilder): Promise<IIssueDocument>;
    /**
     * Get issue by ID with business logic
     */
    getIssueById(id: string, includeDeleted?: boolean): Promise<IIssueDocument | null>;
    /**
     * Get all issues with business logic filtering
     */
    getIssues(filters?: {
        propertyId?: string;
        assignedTo?: string;
        status?: IssueStatus;
        priority?: IssuePriority;
        category?: IssuesCategory;
        entityType?: EntityType;
        entityId?: string;
        includeDeleted?: boolean;
        limit?: number;
        skip?: number;
    }): Promise<IIssueDocument[]>;
    /**
     * Update an issue with business logic validation
     */
    updateIssue(id: string, updateData: UpdateIssueData): Promise<IIssueDocument | null>;
    /**
     * Soft delete an issue with business logic
     */
    deleteIssue(id: string, deletedBy: string): Promise<boolean>;
    /**
     * Permanently delete an issue
     */
    permanentlyDeleteIssue(id: string): Promise<boolean>;
    /**
     * Add a comment with business logic
     */
    addComment(issueId: string, commentData: AddCommentData): Promise<IIssueDocument | null>;
    /**
     * Update a comment on an issue
     */
    updateComment(issueId: string, commentId: string, content: string, userId: string): Promise<boolean>;
    /**
     * Remove a comment from an issue
     */
    removeComment(issueId: string, commentId: string): Promise<boolean>;
    /**
     * Resolve an issue with business logic
     */
    resolveIssue(id: string, resolvedBy: string): Promise<IIssueDocument | null>;
    /**
     * Reopen a resolved issue
     */
    reopenIssue(id: string, reopenedBy: string): Promise<IIssueDocument | null>;
    /**
     * Assign an issue with business logic
     */
    assignIssue(id: string, userId: string, assignedBy: string): Promise<IIssueDocument | null>;
    /**
     * Unassign an issue
     */
    unassignIssue(id: string, unassignedBy: string): Promise<IIssueDocument | null>;
    /**
     * Get issues by property with business logic
     */
    getIssuesByProperty(propertyId: string, includeDeleted?: boolean): Promise<IIssueDocument[]>;
    /**
     * Get issues assigned to a user with business logic
     */
    getIssuesByAssignee(assignedTo: string, includeDeleted?: boolean): Promise<IIssueDocument[]>;
    /**
     * Get issues by entity
     */
    getIssuesByEntity(entityId: string, entityType: EntityType, includeDeleted?: boolean): Promise<IIssueDocument[]>;
    /**
     * Get issues by status
     */
    getIssuesByStatus(status: IssueStatus, includeDeleted?: boolean): Promise<IIssueDocument[]>;
    /**
     * Get issues by priority
     */
    getIssuesByPriority(priority: IssuePriority, includeDeleted?: boolean): Promise<IIssueDocument[]>;
    /**
     * Get overdue issues with business logic
     */
    getOverdueIssues(includeDeleted?: boolean): Promise<IIssueDocument[]>;
    /**
     * Get upcoming issues (due within specified days)
     */
    getUpcomingIssues(days?: number, includeDeleted?: boolean): Promise<IIssueDocument[]>;
    /**
     * Get issue statistics with business logic
     */
    getIssueStatistics(propertyId?: string): Promise<{
        total: number;
        pending: number;
        inProgress: number;
        resolved: number;
        closed: number;
        overdue: number;
        byPriority: Record<IssuePriority, number>;
        byCategory: Record<IssuesCategory, number>;
    }>;
    /**
     * Search issues with business logic
     */
    searchIssues(searchTerm: string, filters?: {
        propertyId?: string;
        includeDeleted?: boolean;
        limit?: number;
        skip?: number;
    }): Promise<IIssueDocument[]>;
    private validateIssueData;
    private validateFilters;
    private validateUpdateData;
    private validateStatusTransition;
    private validatePriorityChange;
    private determineDefaultPriority;
    private applyBusinessRules;
    private shouldUpdateStatusOnComment;
    private calculateAverageResponseTime;
    private calculateResolutionRate;
}
