//
// SplitsView.swift
// Workouts
//
// Created by rzen on 7/17/25 at 6:55 PM.
//
// Copyright 2025 Rouslan Zenetl. All Rights Reserved.
//

import SwiftUI

struct SplitsView: View {
    @State private var showingAddSheet: Bool = false

    var body: some View {
        NavigationStack {
            SplitListView()
                .navigationTitle("Splits")
                .toolbar {
                    ToolbarItem(placement: .navigationBarTrailing) {
                        Button(action: { showingAddSheet.toggle() }) {
                            Image(systemName: "plus")
                        }
                    }
                }
        }
        .sheet(isPresented: $showingAddSheet) {
            SplitAddEditView(split: nil)
        }
    }
}
