import SwiftUI

struct GenerationDetailView: View {

    let section: SettingsSection

    @EnvironmentObject
    private var content: Content

    var body: some View {
        switch section {
        case .general:
            GeneralSettingsDetailView(generalSettings: content.settings.general)
        case .folders:
            PathSettingsView()
        case .navigationBar:
            NavigationBarSettingsView()
        case .postFeed:
            PostFeedSettingsView(postSettings: content.settings.posts)
        case .pages:
            PageSettingsDetailView(pageSettings: content.settings.pages)
        case .tagOverview:
            TagOverviewDetailView()
        case .audioPlayer:
            AudioSettingsDetailView(audioPlayer: content.settings.audioPlayer)
        }
    }
}

#Preview {
    GenerationDetailView(section: .folders)
}
