using Inspectron.Settings;
using VisionBuilder.UI.Common;

namespace LindtLeerformPlugin;

public class LeerformSettings : ISettings
{
    public string CameraName { get; }

    public LeerformSettings(string cameraName)
    {
        CameraName = cameraName;
    }

    public int CheckerboardRows { get; set; } = 6;
    public int CheckerboardCols { get; set; } = 9;
    public string CalibrationImageDirectory { get; set; } = Path.Combine("..", "Data", "CalibrationImages");

    public void RegisterSettings(InspectronSettings settings)
    {
        settings.RegisterSimple(this, () => CheckerboardRows, $"{CameraName}/Leerform", nameof(CheckerboardRows));
        settings.RegisterSimple(this, () => CheckerboardCols, $"{CameraName}/Leerform", nameof(CheckerboardCols));
        settings.RegisterSimple(this, () => CalibrationImageDirectory, $"{CameraName}/Leerform", nameof(CalibrationImageDirectory));
    }
}
