<% record = local_assigns[:record] %> <% show_inherit_hint = local_assigns[:show_inherit_hint] %> <% can_upload = local_assigns.fetch(:can_upload, false) %> <% default_cover = Streams::CoverResolver::DEFAULT_COVER_URL %> <% cover_src = record.effective_cover_url.presence || default_cover %> <% remove_id = "remove_cover_#{record.model_name.param_key}" %>
<%= 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? %> <%= hidden_field_tag "remove_cover", "0", id: remove_id, data: { branding_cover_remove: true } %> <% 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 %>