defmodule ReflectOS.Kernel.LayoutManager.Definition do @moduledoc """ Holds the layout manager definition struct. ## Struct Fields * **name** [required]: The name of the layout manager type when it's displayed in the Console UI. * **icon** [required]: An SVG in raw string format which will be displayed next to layout managers in the Console UI. * **description** [optional]: A short description of what the section does. If provided, must be a single arity function an argument called `assigns` which returns a compiled `HEEx` component. The best way to accomplish this is to use the `Phoenix.LiveView.sigil_H/2` macro. ## Example Here is the `Static` example from the `ReflectOS.Kernel.LayoutManger` documentation: %Definition{ name: "Static Layout", icon: \"\"\" \"\"\", description: fn assigns -> ~H\"\"\" Allows selecting a single, static layout. \"\"\" end } """ @enforce_keys [:name, :icon] @type t :: %__MODULE__{ name: binary(), icon: binary(), description: (map() -> Macro.t()) | nil } defstruct name: nil, icon: nil, description: nil end