# Control Center Compliance & Audit Configuration Fragment

[[elements]]
border_bottom = false
border_top = true
name = "compliance_section_header"
title = "✅ Compliance & Audit"
type = "section_header"

# Audit Logging
[[elements]]
default = false
help = "Enable audit logging for all actions"
name = "audit_enabled"
nickel_path = ["audit", "enabled"]
prompt = "Enable Audit Logging"
type = "confirm"

[[elements]]
condition = "audit_enabled == true"
default = 90
help = "Audit log retention in days (range: ${constraint.control_center.audit.retention_days.min}-${constraint.control_center.audit.retention_days.max})"
max = "${constraint.control_center.audit.retention_days.max}"
min = "${constraint.control_center.audit.retention_days.min}"
name = "audit_retention_days"
nickel_path = ["audit", "storage", "retention_days"]
prompt = "Audit Retention (days)"
type = "number"

[[elements]]
condition = "audit_enabled == true"
default = false
help = "Make audit logs immutable (write-once)"
name = "audit_immutable"
nickel_path = ["audit", "storage", "immutable"]
prompt = "Immutable Audit Logs"
type = "confirm"

[[elements]]
condition = "audit_enabled == true"
default = true
help = "Redact sensitive data from audit logs"
name = "audit_redact_sensitive"
nickel_path = ["audit", "redact_sensitive"]
prompt = "Redact Sensitive Data"
type = "confirm"

# Compliance Configuration
[[elements]]
default = false
help = "Enable compliance framework enforcement"
name = "compliance_enabled"
nickel_path = ["compliance", "enabled"]
prompt = "Enable Compliance Framework"
type = "confirm"

[[elements]]
condition = "compliance_enabled == true"
default = false
help = "Enable automated compliance validation"
name = "compliance_validation_enabled"
nickel_path = ["compliance", "validation", "enabled"]
prompt = "Enable Compliance Validation"
type = "confirm"

[[elements]]
condition = "compliance_enabled == true && compliance_validation_enabled == true"
default = 24
help = "Compliance validation interval in hours (range: 1-168)"
max = 168
min = 1
name = "compliance_validation_interval"
nickel_path = ["compliance", "validation", "interval_hours"]
prompt = "Validation Interval (hours)"
type = "number"

# Data Retention
[[elements]]
condition = "compliance_enabled == true"
default = 7
help = "Data retention policy in years (range: 1-30)"
max = 30
min = 1
name = "compliance_data_retention_years"
nickel_path = ["compliance", "data_retention", "policy_years"]
prompt = "Data Retention Policy (years)"
type = "number"

[[elements]]
condition = "compliance_enabled == true"
default = 2555
help = "Audit log retention in days (range: 90-10950, approximately 7 years default)"
max = 10950
min = 90
name = "compliance_audit_log_days"
nickel_path = ["compliance", "data_retention", "audit_log_days"]
prompt = "Audit Log Retention (days)"
type = "number"

# Encryption Requirements
[[elements]]
condition = "compliance_enabled == true"
default = false
help = "Require encryption for sensitive data at rest"
name = "compliance_encryption_required"
nickel_path = ["compliance", "encryption_required"]
prompt = "Require Encryption"
type = "confirm"
