// // ContentDetailInfoLimitedEditionView.swift // SodaLive // // Created by klaus on 3/27/24. // import SwiftUI import Kingfisher struct ContentDetailInfoLimitedEditionView: View { let totalContentCount: Int let remainingContentCount: Int let orderSequence: Int? let buyerList: [ContentBuyer] var body: some View { VStack(alignment: .leading, spacing: 13.3) { HStack(spacing: 0) { Text("한정판") .font(.custom(Font.medium.rawValue, size: 13.3)) .foregroundColor(Color.button) Spacer() if let orderSequence = orderSequence { Text("\(orderSequence)") .font(.custom(Font.bold.rawValue, size: 13.3)) .foregroundColor(Color.button) .padding(.leading, 5.3) Text("/") .font(.custom(Font.bold.rawValue, size: 13.3)) .foregroundColor(Color.grayd2) .padding(.leading, 2.3) Text("\(totalContentCount)") .font(.custom(Font.medium.rawValue, size: 13.3)) .foregroundColor(Color.grayd2) .padding(.leading, 2.3) } else if (remainingContentCount <= 0) { Text("Sold Out") .font(.custom(Font.medium.rawValue, size: 12)) .foregroundColor(Color.grayd2) .padding(.horizontal, 5.3) .padding(.vertical, 3.3) .overlay( RoundedRectangle(cornerRadius: 2.6) .stroke(lineWidth: 1) .foregroundColor(Color.grayd2) ) } else { Text("잔여수량") .font(.custom(Font.medium.rawValue, size: 13.3)) .foregroundColor(Color.grayd2) Text("\(remainingContentCount)") .font(.custom(Font.bold.rawValue, size: 13.3)) .foregroundColor(Color.button) .padding(.leading, 5.3) } } .padding(.vertical, 8) .padding(.horizontal, 10.3) .background(Color(hex: "14262d")) .cornerRadius(5.3) .padding(.top, 13.3) if !buyerList.isEmpty { Text("구매자") .font(.custom(Font.bold.rawValue, size: 18.3)) .foregroundColor(Color.grayee) ScrollView(.horizontal, showsIndicators: false) { HStack(alignment: .top, spacing: 13.3) { ForEach(0..