//
//  ShareButton.swift
//  SelfieCam
//
//  Created by Matt Bruce on 1/4/26.
//

import SwiftUI
import Bedrock

// MARK: - Share Button

struct ShareButton: View {
    let photo: UIImage
    @State private var isShareSheetPresented = false

    var body: some View {
        Button(action: {
            isShareSheetPresented = true
        }) {
            ZStack {
                Circle()
                    .fill(Color.black.opacity(0.6))
                    .frame(width: 80, height: 80)

                Image(systemName: "square.and.arrow.up")
                    .font(.system(size: 24, weight: .medium))
                    .foregroundColor(.white)
            }
            .shadow(radius: 5)
        }
        .sheet(isPresented: $isShareSheetPresented) {
            ShareSheet(activityItems: [photo])
        }
    }
}
