//
//  LoginView.swift
//  vibes
//
//  Created on 11/20/25.
//

import SwiftUI

struct LoginView: View {
    let onLogin: () -> Void
    
    var body: some View {
        ZStack {
            // Background
            Color.black
                .ignoresSafeArea()
            
            VStack(spacing: 32) {
                Spacer()
                
                // Logo/Branding
                VStack(spacing: 16) {
                    Image("sunologo")
                        .resizable()
                        .aspectRatio(contentMode: .fit)
                        .frame(height: 60)
                    
                    Text("Welcome to Vibes")
                        .font(Constants.Typography.largeTitle)
                        .foregroundColor(Constants.ForegroundPrimary)
                    
                    Text("Create, remix, and explore music")
                        .font(Constants.Typography.mediumRegular)
                        .foregroundColor(Constants.ForegroundSecondary)
                        .multilineTextAlignment(.center)
                }
                .padding(.horizontal, 32)
                
                Spacer()
                
                // Login Button
                Button(action: onLogin) {
                    HStack(spacing: 12) {
                        Text("Log In")
                            .font(Constants.Typography.mediumTitle)
                        
                        Image(systemName: "arrow.right")
                            .font(.system(size: 16, weight: .semibold))
                    }
                    .foregroundColor(.black)
                    .frame(maxWidth: .infinity)
                    .frame(height: 56)
                    .background(Constants.ForegroundPrimary)
                    .cornerRadius(16)
                }
                .padding(.horizontal, 24)
                .padding(.bottom, 48)
            }
        }
    }
}

#Preview {
    LoginView(onLogin: {
        print("Login tapped")
    })
}

