//
//  TabBarViews.swift
//  Socia
//
//  Created by Mehmet Ateş on 21.02.2022.
//

import SwiftUI

struct TabBarView: View {
    @EnvironmentObject private var authSystem: AuthSystem
    @Binding var currentTab : String
    init(tab : Binding<String>){
        self._currentTab = tab
    }
    var body: some View {
        HStack(spacing:0){
            TabBarButtonView(title: "LOCAL_TAB_FLOW", imageOrUrl: "rectangle.portrait", currentTab: self.$currentTab)
            TabBarButtonView(title: "LOCAL_TAB_SEARCH", imageOrUrl: "magnifyingglass", currentTab: self.$currentTab)
            TabBarButtonView(title: "LOCAL_TAB_CAMERA", imageOrUrl: "camera", currentTab: self.$currentTab)
            TabBarButtonView(title: "LOCAL_TAB_NOTIFICATION", imageOrUrl: "bell", currentTab: self.$currentTab)
            TabBarButtonView(title: "LOCAL_TAB_PROFILE", imageOrUrl: self.authSystem.currentUser?.imagePath ?? "person.circle", currentTab: self.$currentTab)
        }
    }
}
