using adas_core.Domain.Enums;
using adas_core.Domain.Models.DTO.Display;
using adas_core.Domain.Models.Filter;
using adas_core.Domain.Models.GroupedObservations;
using adas_core.Domain.Models.MongoModels;
using adas_core.Domain.Models.Responses;
using MongoDB.Bson;

namespace adas_core.Application.Services.Interfaces;

public interface IDisplayConfigService
{
    Task<List<DisplayConfig>> GetAll();
    Task<PaginationResponse<DisplayConfigMinimalResponse>> GetAllCompactPaginated(PaginationFilter request);
    Task<List<DisplayConfig>> GetByType(DisplayConfigEnums.DisplayType type);
    Task<DisplayConfig> GetById(ObjectId id);
    Task<DisplayConfig?> GetById(ObjectId? configId, ObjectId unitId, DisplayConfigEnums.DisplayType displayType);
    Task<DisplayConfig?> InsertOne(DisplayConfig config);
    Task<DisplayConfig?> InsertOneMinimal(CreateDisplayConfigDto config);
    Task<DisplayConfig> InsertOneTest();
    Task<DisplayConfig?> UpdateConfig(ObjectId displayConfigId, object newDisplayConfig);
    Task<bool> UpdateFieldList(ObjectId objectIdConfigDisplay, List<Field> fields);
    Task<bool> UpdateConfigColor(ObjectId objectIdConfigDisplay, ColorConfig colorConfigDto);
    Task<bool> UpdateHeaderConfig(ObjectId objectIdConfigDisplay, HeaderConfig headerConfig);
    Task<bool> UpdateSetHomeBanner(ObjectId objectIdConfigDisplay, List<BannerItem> bannerItems);
    Task<bool> UpdateBaseConfig(DisplayConfig baseConfig);
    Task<bool> UpdateDisplayConfigHospitalName(ObjectId objectIdConfigDisplay, string name);
    Task<bool> DeleteDisplayConfig(ObjectId objectIdConfigDisplay);
    Task<DisplayConfig?> GetDefaultConfig(DisplayConfigEnums.DisplayType type);
    Task<List<DisplayConfigLocationDto>> GetDisplayConfigLocations(ObjectId objectIdConfigDisplay);
    Task<List<DisplayConfigMinimalResponse>> GetAllCompact();

    Task<DisplayConfig?> InsertOneWithTemplate(string objectId,
        DisplayConfigEnums.DisplayType configType, string? configHospital);

    Task<bool> UpdateCardConfig(CardConfig baseConfig);
    Task<CardConfig?> InsertCardConfig(CreateDisplayConfigCardDto updateDisplayConfigNameDto);
    Task<List<CardConfig>> GetCardConfigAll();
    Task<CardConfig?> GetCardConfigById(ObjectId id);
    Task<bool> UpdateDetailConfig(CardDetailsConfig baseConfig);
    Task<CardDetailsConfig?> InsertCardDetailConfig(CreateDisplayConfigCardDto updateDisplayConfigNameDto);
    Task<ChartConfig?> InsertChartConfig(CreateDisplayConfigCardDto updateDisplayConfigNameDto);
    Task<bool> UpdateChartConfig(ChartConfig baseConfig);
    Task<bool> DeleteChartConfig(ObjectId objectIdConfigDisplay);
    Task<ChartConfig?> GetChartConfig(ObjectId objectIdConfigChart);
}