//
//  PlayerIconButton.swift
//  vibes
//
//  Created by Claude Code on 7/30/25.
//

import SwiftUI

struct PlayerIconButton: View {
    let iconName: String
    let action: () -> Void
    
    init(iconName: String, action: @escaping () -> Void) {
        self.iconName = iconName
        self.action = action
    }
    
    var body: some View {
        Button(action: action) {
            Image(iconName)
                .resizable()
                .aspectRatio(contentMode: .fit)
                .frame(width: 16, height: 16) // size-4 = 16x16pt
                .foregroundColor(Constants.ForegroundPrimary)
                .frame(width: 44, height: 44) // Button size from Figma
                .glassEffect(.regular, in: Circle())
        }
    }
}

#Preview {
    ZStack {
        Color.black
            .ignoresSafeArea()
        
        VStack(spacing: 20) {
            Text("Player Icon Button")
                .font(Constants.Typography.largeTitle)
                .foregroundColor(.white)
            
            PlayerIconButton(iconName: "plus") {
                print("Button tapped")
            }
            
        }
    }
}
