<commit_before>// 
//  TxStatusIcon.swift
//  breadwallet
//
//  Created by <NAME> on 2020-09-10.
//  Copyright © 2020 Breadwinner AG. All rights reserved.
//
//  See the LICENSE file at the project root for license information.
//

import SwiftUI

enum StatusIcon {
    case sent
    case received
    case pending(CGFloat) //progress associated value
    case failed
    
    var icon: String {
        switch self {
        case .sent: return "sendArrow"
        case .received: return "receivedArrow"
        case .pending(_): return "pendingIndicator"
        case .failed: return "failed"
        }
    }
    
    @available(iOS 13.0, *)
    var color: Color {
        switch self {
        case .sent:
            return Color(UIColor.fromHex("EFEFF2"))
        case .received:
            return Color(Theme.success).opacity(0.16)
        case .pending(_):
            return Color(Theme.accent).opacity(0.16)
        case .failed:
            return Color(Theme.error).opacity(0.16)
        }
    }
}

@available(iOS 13.0, *)
struct TxStatusIcon: View {
    
    @SwiftUI.State private var isAnimating = false
    var foreverAnimation: Animation {
        Animation.linear(duration: 2.0)
            .repeatForever(autoreverses: false)
    }
    
    let status: StatusIcon
    
    var body: some View {
        ZStack {
            SwiftUI.Circle()
                .fill(status.color)
            buildBody()
        }.frame(width: 40, height: 40)
    }
    
    func buildBody() -> some View {
        if case .pending(let progress) = status {
            return AnyView(PendingCircle(progress: progress)
                            .padding(10.0))
        } else {<commit_msg>Remove unused code<commit_after>// 
//  TxStatusIcon.swift
//  breadwallet
//
//  Created by <NAME> on 2020-09-10.
//  Copyright © 2020 Breadwinner AG. All rights reserved.
//
//  See the LICENSE file at the project root for license information.
//

import SwiftUI

enum StatusIcon {
    case sent
    case received
    case pending(CGFloat) //progress associated value
    case failed
    
    var icon: String {
        switch self {
        case .sent: return "sendArrow"
        case .received: return "receivedArrow"
        case .pending(_): return "pendingIndicator"
        case .failed: return "failed"
        }
    }
    
    @available(iOS 13.0, *)
    var color: Color {
        switch self {
        case .sent:
            return Color(UIColor.fromHex("EFEFF2"))
        case .received:
            return Color(Theme.success).opacity(0.16)
        case .pending(_):
            return Color(Theme.accent).opacity(0.16)
        case .failed:
            return Color(Theme.error).opacity(0.16)
        }
    }
}

@available(iOS 13.0, *)
struct TxStatusIcon: View {
    
    let status: StatusIcon
    
    var body: some View {
        ZStack {
            SwiftUI.Circle()
                .fill(status.color)
            buildBody()
        }.frame(width: 40, height: 40)
    }
    
    func buildBody() -> some View {
        if case .pending(let progress) = status {
            return AnyView(PendingCircle(progress: progress)
                            .padding(10.0))
        } else {
{'fraction_non_alphanumeric': 0.10422535211267606, 'fraction_numerical': 0.022535211267605635, 'mean_word_length': 1.7767158992180712, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1546612', 'n_tokens_mistral': 986, 'n_tokens_neox': 925, 'n_words': 254}