   @type templates() :: %{optional(binary()) => Template.t()}
 
   @type options :: [
-    type: Template.template_type(),
-    includes: templates()
-  ]
+          type: Template.template_type(),
+          includes: templates()
+        ]
+
+  @default_options [type: :template, includes: %{}]
 
   @inject """
   <%

    end
  end

  @spec compile_files([Serum.File.t()], options()) :: Result.t(map())
  def compile_files(files, options) do
    raise "not implemented"
  end

  @spec compile_file(Serum.File.t(), Template.template_type()) ::
          Result.t({binary(), Template.t()})
  defp compile_file(file, type) do
    injected_file = %Serum.File{file | in_data: @inject <> file.in_data}

    with {:ok, file2} <- Plugin.processing_template(injected_file),
         {:ok, ast} <- compile_string(file2.in_data, type),
         template = Template.new(ast, type, file2.src),
         name = Path.basename(file2.src, ".html.eex"),
         {:ok, template2} <- Plugin.processed_template(template) do
      {:ok, {name, template2}}

    end
  end

  defp expand_includes(anything_else, _), do: anything_else
end
