<commit_before>module GM
  CellStylesheet = Teacup::Stylesheet.new do
    style :cell_label,
      background: :clear,
      color: '#526691',
      font: :system.uifont(12),
      alignment: :right
    if device_is? iPhone
      style :cell_label,
        frame: [[0, 15], [67, 15]]
    else
      raise "todo: make this the right size for an iPad"
      style :cell_label,
        frame: [[0, 15], [67, 15]]
    end

    style :cell_input,
      color: :black,
      font: :bold.uifont(15),
      borderStyle: :none,
      edgeInsets: [11.5, 3, 0, 0],
      autoresizing: :fill,
      frame: [[67, 0], [230, 45]]

    style :long_cell_label, extends: :cell_label,
      frame: [[0, 15], [180, 15]]

    style :cell_switch,
      frame: [[209, 8], [79, 27]]
  end

  class GMCellClass < UITableViewCell
    class << self
      attr_accessor :stylesheet

      # override the default stylesheet by assigning it to
      # `TextFieldCellClass.stylesheet` or `BooleanCellClass`.stylesheet
      def stylesheet
        @stylesheet ||= CellStylesheet
      end
    end
  end

  class TextFieldCellClass < GMCellClass
    attr_accessor :textLabel, :input

    def initWithStyle(style, reuseIdentifier:identifier)
      super(:value2.uitablecellstyle, reuseIdentifier:identifier).tap do
        self.stylesheet = self.class.stylesheet

        layout(self.contentView, :cell) do
          @textLabel = self.subview(UILabel, :cell_label)
          @input = self.subview(InsetTextField, :cell_input)
        end
      end
    end

    def didMoveToSuperview
      self.frame = self.frame.height(superview.height)
    end

  end


  class BooleanCellClass < GMCellClass
    attr_accessor :textLabel, :input

    def initWithStyle(style, reuseIdentifier:identifier)
      super(:value2.uitablecellstyle, reuseIdentifier:identifier).tap do
        self.stylesheet = self.class.stylesheet

        layout(self.contentView, :cell) do
          @textLabel = self.subview(UILabel, :long_cell_label)
          @input = self.subview(UISwitch, :cell_switch)
        end
        self.selectionStyle = UITableViewCellSelectionStyleNone
      end
    end
  end
end<commit_msg>remove teacup code<commit_after>module GM
  class TextFieldCellClass < UITableViewCell
    attr_accessor :textLabel, :input

    def initWithStyle(style, reuseIdentifier:identifier)
      super(:value2.uitablecellstyle, reuseIdentifier:identifier).tap do
        @textLabel = UILabel.alloc.initWithFrame([[0, 15], [67, 15]])
        @textLabel.backgroundColor = :clear.uicolor
        @textLabel.textColor = '#526691'.uicolor
        @textLabel.font = :system.uifont(12)
        @textLabel.textAlignment = :right.uitextalignment
        self.contentView.addSubview(@textLabel)

        @input = InsetTextField.alloc.initWithFrame([[67, 0], [230, 45]])
        @input.textColor = :black.uicolor
        @input.font = :bold.uifont(15)
        @input.borderStyle = :none.uiborderstyle
        @input.edgeInsets = [11.5, 3, 0, 0]
        @input.autoresizingMask = :fill.uiautoresizemask
        self.contentView.addSubview(@input)
      end
    end

    def didMoveToSuperview
      self.frame = self.frame.height(superview.height)
    end

  end


  class BooleanCellClass < UITableViewCell
    attr_accessor :textLabel, :input

    def initWithStyle(style, reuseIdentifier:identifier)
      super(:value2.uitablecellstyle, reuseIdentifier:identifier).tap do
        self.selectionStyle = UITableViewCellSelectionStyleNone

        @textLabel = UILabel.alloc.initWithFrame([[0, 15], [180, 15]])
        @textLabel.backgroundColor = :clear.uicolor
        @textLabel.textColor = '#526691'.uicolor
        @textLabel.font = :system.uifont(12)
        @textLabel.textAlignment = :right.uitextalignment
        self.contentView.addSubview(@textLabel)

        @input = UISwitch.alloc.initWithFrame([[209, 8], [79, 27]])
        self.contentView.addSubview(@input)
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.10586443259710586, 'fraction_numerical': 0.028687484133028688, 'mean_word_length': 2.94, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 3, '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': '7544821', 'n_tokens_mistral': 1336, 'n_tokens_neox': 1207, 'n_words': 262}