// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using FloraMultiPlatformFrontend.Presentation.Models;
using FloraMultiPlatformFrontend.Presentation.Models.Charts;
using FloraMultiPlatformFrontend.Presentation.Models.Machines;

namespace FloraMultiPlatformFrontend.Data.Repositories.Interfaces;

public interface IErrorsRepository
{
    Task<IEnumerable<ErrorDatabaseResult>> GetErrorSummariesAsync(
        DateTime startDateTime,
        DateTime endDateTime,
        string serverName,
        string machineCode,
        bool useCache,
        IEnumerable<int>? selectedTagIds = null,
        CancellationToken cancellationToken = default
    );

    Task<IEnumerable<WarningAlarmDetail>> GetErrorDetailsAsync(
        int tagId,
        DateTime startDateTime,
        DateTime endDateTime,
        string serverName,
        string machineCode,
        bool useCache,
        CancellationToken cancellationToken = default
    );

    Task<IEnumerable<WarningAlarmDetail>> GetErrorDetailsAsync(
        int tagId,
        FilterData filterData,
        string serverName,
        string machineCode,
        bool useCache,
        CancellationToken cancellationToken = default
    );
    Task<IEnumerable<CurrentErrorDatabaseResult>> GetCurrentErrorsAsync(
        string serverName,
        string machineCode,
        IEnumerable<int>? selectedTagIds = null,
        CancellationToken cancellationToken = default
    );

    Task<IEnumerable<ChartDataPoint>> GetErrorTagHistoryAsync(
        int tagId,
        DateTime startDateTime,
        DateTime endDateTime,
        string serverName,
        string machineCode,
        CancellationToken cancellationToken = default
    );

}
