<%= content_for :title, @issue.title %>

<%= content_for :description do %>
  <p>You have set your family currency preference to <%= Current.family.currency %>.  <%= @issue.issuable.name %> has
    entries in another currency, which means we have to fetch exchange rates from a data provider to accurately show
    historical results.</p>

  <p>We have detected that your exchange rates provider is not configured yet.</p>
<% end %>

<%= content_for :action do %>
  <% if self_hosted? %>
    <p>To fix this issue, you need to provide an API key for your exchange rate provider.</p>

    <p>Currently, we support <%= link_to "Synth Finance", "https://synthfinance.com", target: "_blank" %>, so you need
      to
      get a free API key from the link provided.</p>

    <p>Once you have your API key, paste it below to configure it.</p>

    <%= styled_form_with model: @issue, url: issue_exchange_rate_provider_missing_path(@issue), method: :patch, class: "space-y-3" do |form| %>
      <%= form.text_field :synth_api_key, label: "Synth API Key", placeholder: "Synth API Key", type: "password", class: "w-full", value: Setting.synth_api_key %>
      <%= form.submit "Save and Re-Sync Account", class: "btn-primary" %>
    <% end %>
  <% else %>
    <p>Please contact the Maybe team.</p>
  <% end %>
<% end %>
