<commit_before>/**
 * <NAME> - http://taewon.de - @hataewon
 * See LICENSE
 */

import Cocoa
import MaterialIcons

public struct Theme {
  public static let `default` = Self()

  public var foregroundColor = NSColor.textColor
  public var backgroundColor = NSColor.textBackgroundColor
  public var separatorColor = NSColor.gridColor

  public var selectedForegroundColor = NSColor.selectedTextColor
  public var selectedBackgroundColor = NSColor.selectedTextBackgroundColor

  public var tabSelectedIndicatorColor = NSColor.selectedTextColor

  public var titleFont = NSFont.systemFont(ofSize: 11)
  public var selectedTitleFont = NSFont.boldSystemFont(ofSize: 11)

  public var tabHeight = CGFloat(28)

  public var tabMaxWidth = CGFloat(250)
  public var separatorThickness = CGFloat(1)
  public var tabHorizontalPadding = CGFloat(4)
  public var tabSelectionIndicatorThickness = CGFloat(3)
  public var iconDimension = CGSize(width: 16, height: 16)

  public var tabMinWidth: CGFloat {
    4 * self.tabHorizontalPadding + 2 * self.iconDimension.width + 32
  }

  public var tabBarHeight: CGFloat { self.tabHeight }
  public var tabSpacing = CGFloat(-1)

  public var closeButtonImage: NSImage
  public var selectedCloseButtonImage: NSImage

  public init() {
    self.closeButtonImage = Icon.close.asImage(
      dimension: self.iconDimension.width,
      color: self.foregroundColor
    )

    self.selectedCloseButtonImage = Icon.close.asImage(
      dimension: self.iconDimension.width,
      color: self.selectedForegroundColor
    )
  }
}<commit_msg>Refactor slightly<commit_after>/**
 * <NAME> - http://taewon.de - @hataewon
 * See LICENSE
 */

import Cocoa
import MaterialIcons

public struct Theme {
  public static let `default` = Self()

  public var foregroundColor = NSColor.textColor {
    didSet {
      self.closeButtonImage = Icon.close.asImage(
        dimension: self.iconDimension.width,
        color: self.foregroundColor
      )
    }
  }
  public var backgroundColor = NSColor.textBackgroundColor
  public var separatorColor = NSColor.gridColor

  public var selectedForegroundColor = NSColor.selectedTextColor {
    didSet {
      self.selectedCloseButtonImage = Icon.close.asImage(
        dimension: self.iconDimension.width,
        color: self.selectedForegroundColor
      )
    }
  }

  public var selectedBackgroundColor = NSColor.selectedTextBackgroundColor

  public var tabSelectedIndicatorColor = NSColor.selectedTextColor

  public var titleFont = NSFont.systemFont(ofSize: 11)
  public var selectedTitleFont = NSFont.boldSystemFont(ofSize: 11)

  public var tabHeight = CGFloat(28)

  public var tabMaxWidth = CGFloat(250)
  public var separatorThickness = CGFloat(1)
  public var tabHorizontalPadding = CGFloat(4)
  public var tabSelectionIndicatorThickness = CGFloat(3)
  public var iconDimension = CGSize(width: 16, height: 16)

  public var tabMinWidth: CGFloat {
    3 * self.tabHorizontalPadding + self.iconDimension.width + 32
  }

  public var tabBarHeight: CGFloat { self.tabHeight }
  public var tabSpacing = CGFloat(-1)

  public var closeButtonImage: NSImage
  public var selectedCloseButtonImage: NSImage

  public init() {
    self.closeButtonImage = Icon.close.asImage(
      dimension: self.iconDimension.width,
      color: self.foregroundColor
    )

    self.selectedCloseButtonImage = Icon.close.asImage(
      dimension: self.iconDimension.width,
      color: self.selectedForegroundColor
    )
  }
}
{'fraction_non_alphanumeric': 0.0765674660502745, 'fraction_numerical': 0.011846287200231146, 'mean_word_length': 3.9386590584878745, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7460226', 'n_tokens_mistral': 1059, 'n_tokens_neox': 1007, 'n_words': 252}