// TempoEnabledEnvironment.swift // Lyrebird // // Copyright (c) 2026 Joshua Parmenter / realizedsound // SPDX-License-Identifier: MIT import SwiftUI /// Environment flag mirroring ``ShoeGaze/tempoEnabled`` so leaf views (e.g. ``PedalSwitchView``) /// can disable tempo-synced controls without each needing a reference to the session. Set once /// near the builder root; defaults to `true`. private struct TempoEnabledKey: EnvironmentKey { static let defaultValue: Bool = true } extension EnvironmentValues { /// `true` when the tempo indicator is shown and tempo-synced features are active. var shoeGazeTempoEnabled: Bool { get { self[TempoEnabledKey.self] } set { self[TempoEnabledKey.self] = newValue } } }