@using ZB.MOM.WW.OtOpcUa.Configuration.Entities

@* Reusable OPC 40010 Machinery Identification editor. Binds to an Equipment row and renders the
   nine decision #139 fields in a consistent 3-column Bootstrap grid. Used by EquipmentTab's
   create + edit forms so the same UI renders regardless of which flow opened it. *@

<h6 class="mt-4">OPC 40010 Identification</h6>
<div class="row g-3">
    <div class="col-md-4">
        <label class="form-label">Manufacturer</label>
        <InputText @bind-Value="Equipment!.Manufacturer" class="form-control"/>
    </div>
    <div class="col-md-4">
        <label class="form-label">Model</label>
        <InputText @bind-Value="Equipment!.Model" class="form-control"/>
    </div>
    <div class="col-md-4">
        <label class="form-label">Serial number</label>
        <InputText @bind-Value="Equipment!.SerialNumber" class="form-control"/>
    </div>
    <div class="col-md-4">
        <label class="form-label">Hardware rev</label>
        <InputText @bind-Value="Equipment!.HardwareRevision" class="form-control"/>
    </div>
    <div class="col-md-4">
        <label class="form-label">Software rev</label>
        <InputText @bind-Value="Equipment!.SoftwareRevision" class="form-control"/>
    </div>
    <div class="col-md-4">
        <label class="form-label">Year of construction</label>
        <InputNumber @bind-Value="Equipment!.YearOfConstruction" class="form-control"/>
    </div>
    <div class="col-md-4">
        <label class="form-label">Asset location</label>
        <InputText @bind-Value="Equipment!.AssetLocation" class="form-control"/>
    </div>
    <div class="col-md-4">
        <label class="form-label">Manufacturer URI</label>
        <InputText @bind-Value="Equipment!.ManufacturerUri" class="form-control" placeholder="https://…"/>
    </div>
    <div class="col-md-4">
        <label class="form-label">Device manual URI</label>
        <InputText @bind-Value="Equipment!.DeviceManualUri" class="form-control" placeholder="https://…"/>
    </div>
</div>

@code {
    [Parameter, EditorRequired] public Equipment? Equipment { get; set; }
}
