import SwiftUI
import Bedrock

struct FloatingShareButton: View {
    let action: () -> Void

    var body: some View {
        Button(action: action) {
            Image(systemName: "qrcode")
                .typography(.title2)
                .fontWeight(.semibold)
                .foregroundStyle(.white)
                .frame(width: Design.CardSize.floatingButtonSize, height: Design.CardSize.floatingButtonSize)
                .background(
                    Circle()
                        .fill(Color.Accent.red)
                        .shadow(
                            color: Color.Accent.red.opacity(Design.Opacity.medium),
                            radius: Design.Shadow.radiusMedium,
                            x: Design.Shadow.offsetNone,
                            y: Design.Shadow.offsetSmall
                        )
                )
        }
        .accessibilityLabel(String.localized("Share"))
        .accessibilityHint(String.localized("Opens the share sheet to send your card"))
    }
}
