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: channel_row.rb
    path of file: ./repos/discourse/plugins/chat/spec/system/page_objects/chat/components
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module PageObjects
  module Components
    module Chat
      class ChannelRow < PageObjects::Components::Base
        SELECTOR = ".chat-channel-row"

        attr_reader :id

        def initialize(id)
          @id = id
        end

        def non_existent?(**args)
          exists?(**args, does_not_exist: true)
        end

        def exists?(**args)
          selector = build_selector(**args)
          selector_method = args[:does_n
    
        def non_existent?(**args)
          exists?(**args, does_not_exist: true)
        end

        def exists?(**args)
          selector = build_selector(**args)
          selector_method = args[:does_not_exist] ? :has_no_selector? : :has_selector?
          page.send(selector_method, selector)
        end

        def leave
          component(class: ".can-leave").hover
          btn = component.find(".chat-channel-leave-btn", visible: :all)
          btn.click
        end

        def component(**args)
          find(build_selector(**args))
        end

        private

        def build_selector(**args)
          selector = SELECTOR
          selector += args[:class] if args[:class]
          selector += "[data-chat-channel-id=\"#{self.id}\"]" if self.id
          selector
        end
      end