import SwiftUI

struct ChargersView: View {
    let system: ElectricalSystem

    private var titleText: String {
        let format = NSLocalizedString(
            "chargers.title",
            bundle: .main,
            comment: "Title describing chargers belonging to a system"
        )
        return String(format: format, system.name)
    }

    private var subtitleText: String {
        String(
            localized: "chargers.subtitle",
            bundle: .main,
            comment: "Subtitle shown while chargers tab is under construction"
        )
    }

    var body: some View {
        VStack(spacing: 16) {
            Image(systemName: "bolt.fill")
                .font(.largeTitle)
                .foregroundStyle(.secondary)

            Text(titleText)
                .font(.title3)
                .fontWeight(.semibold)

            Text(subtitleText)
                .font(.subheadline)
                .foregroundStyle(.secondary)
                .multilineTextAlignment(.center)
        }
        .frame(maxWidth: .infinity, maxHeight: .infinity)
        .background(Color(.systemGroupedBackground))
    }
}

#Preview {
    ChargersView(system: ElectricalSystem(name: "Preview System"))
}
