<% record = local_assigns[:record] %> <% show_inherit_hint = local_assigns[:show_inherit_hint] %> <% can_upload = local_assigns.fetch(:can_upload, false) %> <% cover_src = record.effective_cover_url.presence || Streams::CoverResolver::DEFAULT_COVER_URL %>
<%= t("club.branding.cover_legend") %> <% if show_inherit_hint %>

<%= t("club.branding.cover_inherit_hint") %>

<% end %>

<%= t("club.branding.cover_hint") %>

<%= label_tag "branding[cover_image]", t("club.branding.cover_file_label") %>
<%= image_tag cover_src, alt: t("club.branding.cover_preview_alt"), class: "branding-cover-preview__img", data: { branding_cover_img: true } %>
<% if can_upload %> <%= file_field_tag "branding[cover_image]", accept: "image/png,image/jpeg,image/webp", data: { branding_cover_file: true }, class: "branding-file-input" %> <% if record.cover_image_attached? %> <% end %> <% else %>

<%= t("club.branding.cover_requires_full") %>

<%= link_to t("club.branding.cover_see_plans"), public_prezzi_path, class: "btn btn-secondary btn-sm" %> <% end %>