namespace ZB.MOM.WW.OtOpcUa.Commons.Browsing;
/// One node in a driver-agnostic browse tree.
/// Stable identifier passed back to the picker on commit. For OPC UA
/// this is the nsu=...;... form; for Galaxy this is the tag_name.
/// Label shown in the tree.
/// Whether this node terminates the address (Leaf) or has children
/// (Folder). Galaxy never returns Leaves; only the attribute side-panel terminates.
/// When true, the UI renders an expand affordance before
/// the children have been fetched.
public sealed record BrowseNode(
string NodeId,
string DisplayName,
BrowseNodeKind Kind,
bool HasChildrenHint);
/// Discriminates terminal vs. expandable nodes for UI rendering.
public enum BrowseNodeKind
{
/// Expandable — has (or may have) children. UI shows expand affordance.
Folder,
/// Terminal — commit on select.
Leaf,
}
/// Metadata for an attribute of a Galaxy object (or the equivalent
/// per-driver concept). Surfaced in the picker's attribute side-panel.
public sealed record AttributeInfo(
string Name,
string DriverDataType,
bool IsArray,
string SecurityClass);