namespace ZB.MOM.WW.OtOpcUa.AdminUI.Components.Shared.Drivers.Pickers;

/// <summary>
/// Pure static helper that converts AB Legacy PLC file-type + file-number + element
/// into the canonical address string (e.g. N7:0).
/// Extracted so unit tests can call it without bUnit.
/// </summary>
public static class AbLegacyAddressBuilder
{
    /// <summary>Builds the canonical AB Legacy address string from its file-type, file-number, and element parts.</summary>
    /// <param name="fileType">The file-type prefix (e.g. <c>N</c>).</param>
    /// <param name="fileNumber">The file number.</param>
    /// <param name="element">The element index within the file.</param>
    /// <returns>The canonical address string (e.g. <c>N7:0</c>).</returns>
    public static string Build(string fileType, int fileNumber, int element)
        => $"{fileType}{fileNumber}:{element}";
}
