// Copyright © Selmo Technology GmbH. All Rights Reserved

using SelmoStudio.Hmi.Server.SelmoHmi.Model.Dtos;
using SelmoStudio.Hmi.Server.SelmoHmi.Model.ProjectItems;
using SelmoStudio.Hmi.Server.SelmoHmi.Plant.Model;
using SelmoStudio.Hmi.Server.SelmoHmi.Sequence.Model;

namespace SelmoStudio.Hmi.Server.SelmoHmi.ProjectInformation.Service
{
    public interface IProjectInformationService
    {
        IReadOnlyList<ProjectItemCollectionHwInfo> HardwareZones { get; }
        IReadOnlyList<HardwareZoneInfoDto> HardwareZoneInfos { get; }
        ProjectItemCollectionPlant CurrentPlant { get; }
        ProjectItemCollectionHwInfo CurrentHardwareZone { get; }
        IReadOnlyList<ProjectItemCollectionSequence> Sequences { get; }
        ProjectItemCollectionSequence CurrentSequence { get; }
        ContentInfo CurrentContentInfo { get; }

        void SelectHardwareZone(HardwareZoneInfoDto hardwareZoneInfo);

        void SelectSequence(ProjectItemCollectionSequence sequence);

        void SelectContentInfo(ContentInfo contentInfo);

        bool TryGetParameter<T>(string parameterName, out T value);

        void SetParameter<T>(string parameterName, T value);

        void ClearParameters();

        event Action SequenceUpdated;

        event Func<Task> SequenceUpdatedAsync;
    }
}