<% add_gem_component_stylesheet("single-page-notification-button") spnb_helper = GovukPublishingComponents::Presenters::SinglePageNotificationButtonHelper.new(local_assigns) shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns) component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns) wrapper_classes = %w(govuk-!-display-none-print) wrapper_classes << shared_helper.get_margin_bottom ga4_data_attributes = ga4_data_attributes ||= nil ga4_link_data_attributes = ga4_data_attributes[:ga4_link] if ga4_data_attributes ga4_link_data_attributes[:url] = spnb_helper.form_action if ga4_link_data_attributes component_helper.add_class(wrapper_classes.join(" ")) component_helper.add_data_attribute({ module: ga4_data_attributes[:module] }) if ga4_data_attributes %> <% button_text = capture do %> <%= spnb_helper.button_text %> <% end %> <%= tag.div(**component_helper.all_attributes) do %> <%= tag.form class: spnb_helper.classes, action: spnb_helper.form_action, method: "POST", data: spnb_helper.data do %> <% if spnb_helper.skip_the_gov_uk_account? %> <% end %> <%= content_tag(:button, button_text, { class: "govuk-body-s gem-c-single-page-notification-button__submit", type: "submit", data: { ga4_link: ga4_link_data_attributes } }) %> <% end %> <% end if spnb_helper.base_path %>