@* Identity section shared by the typed driver pages. The parent page owns the and all data loading/persistence — this component is purely a section of inputs. *@ @using System.ComponentModel.DataAnnotations @using ZB.MOM.WW.OtOpcUa.Configuration.Entities
@(IsNew ? "Identity" : $"Edit {Model.DriverInstanceId}")
@if (ShowDriverType) {
Cannot be changed after creation — drives the actor type that owns this instance.
}
@code { [Parameter, EditorRequired] public DriverIdentityModel Model { get; set; } = new(); [Parameter] public bool IsNew { get; set; } [Parameter] public bool ShowDriverType { get; set; } public sealed class DriverIdentityModel { [Required, RegularExpression("^[A-Za-z0-9_-]+$", ErrorMessage = "Use letters, digits, dash, underscore.")] public string DriverInstanceId { get; set; } = ""; [Required] public string Name { get; set; } = ""; [Required] public string DriverType { get; set; } = "Modbus"; public bool Enabled { get; set; } = true; } }