import SwiftUI
import Bedrock

struct CropOverlay: View {
    let cropSize: CGSize
    let containerSize: CGSize

    var body: some View {
        ZStack {
            Rectangle()
                .fill(Color.black.opacity(Design.Opacity.accent))

            Rectangle()
                .fill(Color.clear)
                .frame(width: cropSize.width, height: cropSize.height)
                .blendMode(.destinationOut)
        }
        .compositingGroup()
        .allowsHitTesting(false)

        Rectangle()
            .stroke(Color.white, lineWidth: Design.LineWidth.thin)
            .frame(width: cropSize.width, height: cropSize.height)
            .allowsHitTesting(false)
    }
}
