import SwiftUI

/// Compact pill shown at the bottom of the screen while background sync runs.
struct SyncToast: View {
    var body: some View {
        HStack(spacing: 10) {
            ProgressView()
                .controlSize(.small)
            Text("Syncing")
                .font(.subheadline.weight(.medium))
        }
        .padding(.horizontal, 16)
        .padding(.vertical, 10)
        .glassEffect(in: .capsule)
    }
}

#Preview {
    ZStack {
        Color(.systemBackground)
        SyncToast()
    }
}
