package infra

// WGClientConfigInput holds all parameters needed to generate a WireGuard
// client-side wg0.conf and its QR representation.
type WGClientConfigInput struct {
	DevicePrivateKey string // base64 Curve25519 private key of the peer device
	DeviceAddress    string // CIDR assigned to the peer, e.g. "10.42.0.10/32"
	HubPublicKey     string // base64 Curve25519 public key of the hub server
	HubEndpoint      string // "host:port" of the hub WireGuard listener, e.g. "organic-machine.com:51820"
	HubAllowedIPs    string // CIDRs routed through hub: "10.42.0.0/24" (mesh) or "0.0.0.0/0" (full tunnel)
	PresharedKey     string // base64 preshared key, optional — must match hub-side config; empty to omit
	PersistentKA     int    // PersistentKeepalive seconds; 0 → defaults to 25 (recommended for NAT/4G)
	DNS              string // optional DNS server, e.g. "10.42.0.1"; empty to omit
}

// WGClientConfig is the output of WGClientConfigGen: the .conf file contents,
// a unicode-block QR string for mobile enrollment, and the suggested filename.
type WGClientConfig struct {
	INI      string // full contents of wg0.conf ready to write to /etc/wireguard/wg0.conf
	QR       string // unicode-block QR art (skip2/go-qrcode ToString) for terminal display or Element message
	Filename string // suggested filename, always "wg0.conf"
}
