<% content_for(:html_title, "#{@template.name} | DocuSeal") %>
<% I18n.with_locale(@template.account.locale) do %>
  <% content_for(:html_description, t('share_link_is_currently_disabled')) %>
<% end %>
<main class="max-w-md space-y-6 mx-auto px-2 mt-12 mb-4">
  <div class="text-center w-full space-y-6">
    <%= render 'banner' %>
    <p class="text-xl font-semibold text-center">
      <%= t('share_link_is_currently_disabled') %>
    </p>
  </div>
  <div class="flex items-center bg-base-200 rounded-xl p-4 mb-4">
    <div class="flex items-center">
      <div class="mr-3">
        <%= svg_icon('writing_sign', class: 'w-10 h-10') %>
      </div>
      <div>
        <p class="text-lg font-bold mb-1"><%= @template.name %></p>
        <% if @template.archived_at? %>
          <p dir="auto" class="text-sm"><%= t('form_has_been_deleted_by_html', name: @template.account.name) %></p>
        <% end %>
      </div>
    </div>
  </div>
  <% if can?(:update, @template) %>
    <toggle-submit class="block">
      <%= button_to button_title(title: t('enable_shared_link'), icon: svg_icon('lock_open', class: 'w-6 h-6')), template_share_link_path(@template), params: { template: { shared_link: true }, redir: start_form_path(slug: @template.slug) }, method: :post, class: 'white-button w-full' %>
    </toggle-submit>
  <% end %>
</main>
<%= render 'shared/attribution', link_path: '/start', account: @template.account %>
