namespace HistoryView.Data;

public partial class CurrentTempConfig : ObservableObject
{
    [ObservableProperty]
    private TempConfigSelector _Selector;

    [ObservableProperty]
    private DateTime _SelectedTime;

    [ObservableProperty]
    private TempConfig? _ConfigFile;
}

public enum TempConfigSelector
{
    Defualt,
    Saved,
    Manual,
    FurnaceRT,
    PMC_Recipe
}

public partial class TempConfig : ObservableObject
{
    [ObservableProperty]
    private string _ConfigName = DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss");

    [ObservableProperty]
    private DateTime _EditTime = DateTime.Now;

    [ObservableProperty]
    private string? _Editor;

    [ObservableProperty]
    private string? _Description;

    [ObservableProperty]
    private ObservableDictionary<byte, TempConfigSubMini8> _Mini8sConfig = [];
}

public partial class TempConfigSubMini8 : ObservableObject
{
    [ObservableProperty]
    private byte _Index;

    [ObservableProperty]
    private ObservableDictionary<byte, TempConfigSubChannel> _ChannelConfig = [];
}

public partial class TempConfigSubChannel : ObservableObject
{
    [ObservableProperty]
    private byte _Index;

    [ObservableProperty]
    private float _Caps;

    [ObservableProperty]
    private float _Floor;

    [ObservableProperty]
    private float _CapsWarning;

    [ObservableProperty]
    private float _FloorWarning;

    [ObservableProperty]
    private float _SetPoint;
    [ObservableProperty]
    private float _Running_P;
    [ObservableProperty]
    private float _Running_I;
    [ObservableProperty]
    private float _Running_D;
    [ObservableProperty]
    private float _SetpointUpRate;
    [ObservableProperty]
    private float _SetpointDownRate;

    [ObservableProperty]
    private ChannelMode _ChannelMode;

    [ObservableProperty]
    private Inhibit _Inhibit;
}