// // ContentMainViewV2.swift // SodaLive // // Created by klaus on 2/21/25. // import SwiftUI import Kingfisher enum ContentMainTab { case HOME case SERIES case CONTENT case ALARM case ASMR case REPLAY case FREE } struct TabItem { let title: String let tab: ContentMainTab } struct ContentMainViewV2: View { @StateObject var contentPlayManager = ContentPlayManager.shared @StateObject var contentPlayerPlayManager = ContentPlayerPlayManager.shared @State private var selectedTab: ContentMainTab = .SERIES @State private var isShowPlayer = false let tabItemList = [ TabItem(title: "홈", tab: .HOME), TabItem(title: "시리즈", tab: .SERIES), TabItem(title: "단편", tab: .CONTENT), TabItem(title: "모닝콜", tab: .ALARM), TabItem(title: "ASMR", tab: .ASMR), TabItem(title: "다시듣기", tab: .REPLAY), TabItem(title: "무료", tab: .FREE) ] init(selectedTab: ContentMainTab = .SERIES) { self._selectedTab = State(initialValue: selectedTab) } var body: some View { NavigationView { ZStack { Color.black.ignoresSafeArea() VStack(spacing: 0) { HStack(spacing: 0) { Text("콘텐츠 마켓") .font(.custom(Font.bold.rawValue, size: 21.3)) .foregroundColor(Color.button) Spacer() Image("ic_content_keep") .onTapGesture { AppState.shared.setAppStep(step: .myBox(currentTab: .orderlist)) } } .padding(.horizontal, 13.3) ScrollViewReader { proxy in ScrollView(.horizontal, showsIndicators: false) { HStack(spacing: 8) { ForEach(0..