<h3>Lightning Network</h3>
<ul role="list">
  <%= render FormElements::FieldsetToggleComponent.new(
    form: f,
    attribute: :lndhub_enabled,
    enabled: Setting.lndhub_enabled?,
    title: "Enable LNDHub integration",
    description: "LNDHub configuration present and wallet features enabled"
  ) %>
  <% if Setting.lndhub_enabled? %>
    <%= render FormElements::FieldsetResettableSettingComponent.new(
      key: :lndhub_api_url,
      title: "API URL"
    ) %>
    <%= render FormElements::FieldsetResettableSettingComponent.new(
      key: :lndhub_admin_token,
      type: :password,
      title: "Admin token",
      description: "Auth token for creating new lndhub accounts"
    ) %>
    <%= render FormElements::FieldsetToggleComponent.new(
      form: f,
      attribute: :lndhub_admin_enabled,
      enabled: Setting.lndhub_admin_enabled?,
      title: "Enable LNDHub admin panel",
      description: "LNDHub database configuration present and admin panel enabled"
    ) %>
    <%= render FormElements::FieldsetToggleComponent.new(
      form: f,
      attribute: :lndhub_keysend_enabled,
      enabled: Setting.lndhub_keysend_enabled?,
      title: "Enable keysend payments",
      description: "Allow users to receive invoice-less payments to their Lightning Address"
    ) %>
    <% if Setting.lndhub_keysend_enabled? %>
      <%= render FormElements::FieldsetResettableSettingComponent.new(
            key: :lndhub_public_key,
            title: "Public key",
            description: "The public key of the Lightning node used by LNDHub"
          ) %>
    <% end %>
  <% end %>
</ul>
