You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: workflow_run_filter_link_component.rb
    path of file: ./repos/open-build-service/src/api/app/components
    
    the code of the file until where you have to start completion: class WorkflowRunFilterLinkComponent < ApplicationComponent
  def initialize(text:, filter_item:, selected_filter:, token:, amount:, icon: '')
    super

    @text = text
    @filter_item = filter
    
  def workflow_run_filter_matches?
    # None of the filter links is active when filtering by PR/MR number or commit SHA
    return false if @selected_filter[:pr_mr] || @selected_filter[:commit]

    if @selected_filter[:status].present?
      @filter_item[:status] == @selected_filter[:status]
    elsif @selected_filter[:generic_event_type].present?
      @filter_item[:generic_event_type] == @selected_filter[:generic_event_type]
    elsif @selected_filter.empty?
      @filter_item.empty?
    end