// Copyright 2026. Licensed under Apache-2.0. See LICENSE.
// Generated by CLI Printing Press (https://github.com/mvanhorn/cli-printing-press). DO NOT EDIT.

package device

const (
	Name                   = "ble-desk-lamp"
	DisplayName            = "BLE Desk Lamp"
	Protocol               = "ble"
	SessionMode            = "one-shot"
	SessionOneShotFallback = false
)

// ServiceUUIDs are the device's BLE GATT service UUIDs, used to discover and
// connect to the device (matching by service rather than advertised name).
var ServiceUUIDs = []string{
	"ff00",
}

type StatusField struct {
	Name                     string `json:"name"`
	SourceCharacteristicUUID string `json:"source_characteristic_uuid"`
	Unit                     string `json:"unit,omitempty"`
	SampleCadence            string `json:"sample_cadence,omitempty"`
	Store                    bool   `json:"store,omitempty"`
}

var StatusFields = []StatusField{}

type CommandDefinition struct {
	Name               string   `json:"name"`
	CharacteristicUUID string   `json:"characteristic_uuid"`
	Safety             string   `json:"safety"`
	ValidationStatus   string   `json:"validation_status,omitempty"`
	PayloadHex         string   `json:"payload_hex"`
	EvidenceRefs       []string `json:"evidence_refs,omitempty"`
	Parameters         []string `json:"parameters,omitempty"`
}

var CommandDefinitions = []CommandDefinition{
	{Name: "toggle", CharacteristicUUID: "ff01", Safety: "low-risk-write", ValidationStatus: "observed", PayloadHex: "01", EvidenceRefs: []string{"toggle-write"}, Parameters: []string{}},
}

type CommandCapability struct {
	Name               string   `json:"name"`
	CharacteristicUUID string   `json:"characteristic_uuid"`
	Safety             string   `json:"safety"`
	ValidationStatus   string   `json:"validation_status,omitempty"`
	EvidenceRefs       []string `json:"evidence_refs,omitempty"`
	Callable           bool     `json:"callable"`
	WithheldReason     string   `json:"withheld_reason,omitempty"`
}

var CommandCapabilities = []CommandCapability{
	{Name: "toggle", CharacteristicUUID: "ff01", Safety: "low-risk-write", ValidationStatus: "observed", EvidenceRefs: []string{"toggle-write"}, Callable: true, WithheldReason: ""},
}

type CapabilitySummary struct {
	Device      string              `json:"device"`
	Protocol    string              `json:"protocol"`
	SessionMode string              `json:"session_mode"`
	Telemetry   []StatusField       `json:"telemetry"`
	Commands    []CommandCapability `json:"commands"`
}

func Capabilities() CapabilitySummary {
	return CapabilitySummary{
		Device:      DisplayName,
		Protocol:    Protocol,
		SessionMode: SessionMode,
		Telemetry:   append([]StatusField(nil), StatusFields...),
		Commands:    append([]CommandCapability(nil), CommandCapabilities...),
	}
}
