# typed: strict
# frozen_string_literal: true
module PathsHelper
  extend T::Sig
  extend T::Helpers
  include HelpersInterface
  abstract!

  private

  sig do
    params(path: String, params: T::Hash[Symbol, T.untyped]).returns(String)
  end
  def to_path(path, params = {})
    params_string = params.reject { |k, v| v.blank? }.to_query
    "#{path}#{"?#{params_string}" if params_string.present?}"
  end
end
