What is the error and how to fix it?

I just started learning Swift and encountered the following problems due to lack of knowledge.

  1. When opening View CategoryEditor with the Add Training button from TreningEditor to add new data to trening.catTrening, the previous element is added, and not the one that the user saves and fills in CategoryEditor
  2. When opening View CategoryEditor a second and subsequent times, View CategoryEditor opens with data already filled in previously, and not empty for adding new data

How to fix and make the correct Binding so that elements created by the user in CategoryEditor are added to the TreningEditor trening.catTrening collection?

import SwiftUI

struct TreningEditor: View {
    @Binding var trening: TreningItem
    @State var isNew = false
    @State var isNewCat = false
    
    @Environment(\.dismiss) private var dismiss
    @FocusState var focusedExercise: Item?
    @FocusState var focusedExerciseList: Exercise?
    @State private var isPickingSymbol = false
    
    @State private var isAddingNewCategory = false
    @State private var newCategory = Item()
    
    var body: some View {
     
            List {
                HStack {
                    Button {
                        isPickingSymbol.toggle()
                    } label: {
                        Image(systemName: trening.symbol)
                            .imageScale(.large)
                            .foregroundColor(Color(trening.color))
                    }
                    .buttonStyle(.plain)
                    .padding(.horizontal, 5)
                    
                    TextField("New Trening", text: $trening.treningName)
                        .font(.title2)
                    
                    Button {
                        isPickingSymbol.toggle()
                    }
                label: {
                    HStack {
                        Image(systemName: "plus")
                    } .buttonStyle(.plain)
                }
                    
                }
                .padding(.top, 5)
                
                DatePicker("Date", selection: $trening.date)
                    .labelsHidden()
                    .listRowSeparator(.hidden)
                
                Text("Exercises")
                    .fontWeight(.bold)
                
                
                ForEach(self.trening.catTrening.indices, id: \.self)// $trening.catTrening)
                { 
                    i in Text("Exercises count: \($trening.catTrening[i].exercise.count)")
                    
                }
                .onDelete(perform: { indexSet in
                    trening.catTrening.remove(atOffsets: indexSet)
                })
                
                Button {
                  
                        print("GeT Append category...")
                        trening.catTrening.append(newCategory)
						newCategory = trening.catTrening.last ?? Item() 
						isNewCat = true
                        //focusedExercise = newCat
                        
                        print("Append category...")
                    
                } label: {
                    HStack {
                        Image(systemName: "plus")
                        Text("Add Trening")
                    }
                }
                .buttonStyle(.borderless)
                .sheet(isPresented: $isNewCat) {
                    CategoryEditor(trening: $newCategory, isNewCat: isNewCat)
                }
            }
        
#if os(iOS)
            .navigationBarTitleDisplayMode(.inline)
#endif
        .sheet(isPresented: $isPickingSymbol) {
            SymbolPicker(trening: $trening)
        }
    }
}

struct TreningEditor_Previews: PreviewProvider {
    static var previews: some View {
        TreningEditor(trening: .constant(TreningItem()), isNew: true)
            .environmentObject(ItemData())
    }
}
import SwiftUI

struct CategoryEditor: View {
    @Binding var trening: Item
    @State var isNewCat = false
    
    @Environment(\.dismiss) private var dismiss
    @FocusState var focusedExercise: Exercise?
    @State private var isPickingSymbol = false
    
    @State private var isAddingNewCategory = false
    @State private var newCategory = Item()
    
    @State var category: String = "Ноги"
     var categoryList = ["Руки","Ноги", "Грудь", "Плечи", "Шея", "Кардио", "Плавание","Фитнес"]
    
     @State var tag: String = "Не выбрано"
     var tagList = ["Не выбрано","Икры","Пресс", "Брасс"]
    
    var body: some View {
        NavigationView
        {
            List {
                // isPickingSymbol.toggle()
                HStack(alignment: .center) {
                    Text("New Category").font(.title2).foregroundColor(Color(trening.color)).frame(minWidth: 0, idealWidth: 100, maxWidth: .infinity, minHeight: 0, idealHeight: 35, maxHeight: .infinity, alignment: .center) 
                }
                .padding(.top, 5)
                
                Picker(selection: $category, label: Text("Тренируем"))
                {
                    ForEach(categoryList, id: \.self)
                    {
                        Text($0)
                    }
                    
                }  .listRowSeparator(.hidden)
                
                Picker(selection: $tag, label: Text("Тег"))
                {
                    ForEach(tagList, id: \.self)
                    {
                        Text($0)
                    }
                    
                }  .listRowSeparator(.hidden)
                
                Text("Exercises")
                    .fontWeight(.bold)
                
                ForEach($trening.exercise)
                { 
                 $item in  ExerciseAddRow(exercise: $item, focusedExercise: $focusedExercise, exerciseSelect: "Не выбрано", exerciseSelectList: ["Не выбрано","Жим ногами"])
                }
                .onDelete(perform: { indexSet in
                    trening.exercise.remove(atOffsets: indexSet)
                })
                
                Button {
                    let newExercise = Exercise(exerciseName: "", 
                                               set: 4, rep: 12, 
                                               link: "",
                                               exerciseCat: "",
                                               isNew: true  )
                    
                    trening.exercise.append(newExercise)
                    focusedExercise = newExercise
                } label: {
                    HStack {
                        Image(systemName: "plus")
                        Text("Add Exercise")
                    }
                }
                .buttonStyle(.borderless)
            }
            
#if os(iOS)
            .navigationBarTitleDisplayMode(.inline)
#endif
            .sheet(isPresented: $isPickingSymbol) {
                // SymbolPicker(trening: $trening)
            }.toolbar{
                ToolbarItem(placement: .cancellationAction){
                    Button("Cancel", action: {dismiss()}).foregroundColor(Color(trening.color))
                }
                ToolbarItem(placement: .confirmationAction){
                    Button("Save", action: 
                            {
                        SaveItemExercises()
                        CategoryEditor(trening: $trening, isNewCat: false)
                        dismiss()
                        
                    }).foregroundColor(Color(trening.color))
                }
            }
        }
    }
    
    func AddExercise() -> Item{
        var addExercise = [Exercise(exerciseName: "Тестовый жим ногами 12", set: 4, rep: 15, link: "", exerciseCat: "", isNew: true)] 
        return Item(category: "Ноги", tag: "Икры", exerciseName: "", rep: 0, set: 0, time: 0, currentDate: Date.now, exercise: addExercise, date: Date.now, symbol: "case.fill", color: ColorOptions.random().rgbaColor);
    }
    
    func SaveItemExercises()
    {
        trening.category = category
        trening.tag = tag
        trening.currentDate = Date.now
        trening.symbol = ItemSymbols.randomName()
        print("Save category: \(trening.category)")
        print("Save tag: \(trening.tag)")
        print("Save count exercise: \(trening.exercise.count)")
        
    }
    
    func GetTrening() -> Item
    {
        return trening
    }
}

struct CategoryEditor_Previews: PreviewProvider {
    static var previews: some View {
        CategoryEditor(trening: .constant(Item()), isNewCat: true)
            .environmentObject(ItemData())
    }
}