   import Phoenix.HTML
 
   @special_attributes ["data", "aria", "class"]
-
   @csrf_param "_csrf_token"
-  @method_param "_method"
 
   @doc ~S"""
   Creates an HTML tag with the given name and options.

          {"", opts}

        "post" ->
          csrf_token_tag(
            action,
            Keyword.put(opts, :method, "post"),
            ""
          )

        _ ->
          csrf_token_tag(
            action,
            Keyword.put(opts, :method, "post"),
            ~s'<input name="#{@method_param}" type="hidden" value="#{method}">'
          )
      end

    opts =

    html_escape([form_tag(action, options), block, raw("</form>")])
  end

  defp csrf_form_tag(to, opts) do
    case Keyword.pop(opts, :csrf_token, true) do
      {csrf_token, opts} when is_binary(csrf_token) ->
        {[~s'<input name="#{@csrf_param}" type="hidden" value="', csrf_token, ~s'">'], opts}

      {true, opts} ->
        csrf_token = csrf_token_value(to)
        {[~s'<input name="#{@csrf_param}" type="hidden" value="', csrf_token, ~s'">'], opts}

      {false, opts} ->
        {[], opts}
    end
  end

