import SwiftUI

struct SupportView: View {
    let container: AppContainer
    @EnvironmentObject private var session: SessionStore
    @Environment(\.openURL) private var openURL

    // Placeholder contact details  replace with the real support line before release.
    private let supportPhone = "+966500000000"
    private let whatsappNumber = "966500000000"

    var body: some View {
        NavigationStack {
            VStack(spacing: 12) {
                BrandButton(title: "call_us".localized) {
                    if let url = URL(string: "tel:\(supportPhone)") { openURL(url) }
                }
                BrandButton(title: "whatsapp_us".localized) {
                    if let url = URL(string: "https://wa.me/\(whatsappNumber)") { openURL(url) }
                }
                Button("sign_out".localized) { session.clear() }
                    .buttonStyle(.bordered)
                Spacer()
            }
            .padding()
            .navigationTitle("support_title".localized)
        }
    }
}
