<commit_before>//
//  BlockBarButtonItem.swift
//  PanelKit
//
//  Created by <NAME> on 11/03/2017.
//  Copyright © 2017 Silver Fox. All rights reserved.
//

import UIKit

class BlockBarButtonItem: UIBarButtonItem {

	private var actionHandler: (() -> Void)?

    convenience init(title: String?, style: UIBarButtonItem.Style, actionHandler: (() -> Void)?) {
		self.init(title: title, style: style, target: nil, action: #selector(barButtonItemPressed))
		self.target = self
		self.actionHandler = actionHandler
	}

    convenience init(image: UIImage?, style: UIBarButtonItem.Style, actionHandler: (() -> Void)?) {
		self.init(image: image, style: style, target: nil, action: #selector(barButtonItemPressed))
		self.target = self
		self.actionHandler = actionHandler
	}

	@objc func barButtonItemPressed(sender: UIBarButtonItem) {
		actionHandler?()
	}

}<commit_msg>Panels now use SF Font.<commit_after>//
//  BlockBarButtonItem.swift
//  PanelKit
//
//  Created by <NAME> on 11/03/2017.
//  Copyright © 2017 Silver Fox. All rights reserved.
//

import UIKit

class BlockBarButtonItem: UIBarButtonItem {

	private var actionHandler: (() -> Void)?

    convenience init(title: String?, style: UIBarButtonItem.Style, actionHandler: (() -> Void)?) {
		self.init(title: title, style: style, target: nil, action: #selector(barButtonItemPressed))
		self.target = self
		self.actionHandler = actionHandler
	}

    convenience init(image: UIImage?, style: UIBarButtonItem.Style, actionHandler: (() -> Void)?) {
		self.init(image: image, style: style, target: nil, action: #selector(barButtonItemPressed))
		self.target = self
		self.actionHandler = actionHandler
	}

	@objc func barButtonItemPressed(sender: UIBarButtonItem) {
		actionHandler?()
	}

    //hacky
    override var title: String? {
        didSet {
            
            if #available(iOS 13.0, *) {
                if self.title == "Close" {
                    self.image = UIImage(systemName: "xmark.circle")
                } else if self.title == "⬇︎" {
                    self.image = UIImage(systemName: "arrow.down.circle")
                }
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.13165266106442577, 'fraction_numerical': 0.012605042016806723, 'mean_word_length': 3.074144486692015, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '6194814', 'n_tokens_mistral': 715, 'n_tokens_neox': 672, 'n_words': 162}