{% set activateNewletter = theme_config('theme-footer-activate-newletter') %}

{% block bc_aqua_newsletter %}
	{% if activateNewletter %}
		<div class="bc-aqua-newsletter">
			{% block bc_aqua_newsletter_container %}
				<div class="bc-aqua-newsletter-container row">
					{% block bc_aqua_newsletter_title %}
						<div class="col-12 bc-aqua-newsletter-title">
							{% block bc_aqua_newsletter_logo %}
								<div class="newsletter-logo-container">
									{% if theme_config('theme-footer-logo') %}
										<div class="newsletter-logo">
											<img src="{{ theme_config('theme-footer-logo') |sw_encode_url }}" alt="{{config('core.basicInformation.shopName')}}" width="215" height="85">
										</div>
									{% endif %}
									{% if not theme_config('theme-footer-logo') %}
										<div class="newsletter-logo">
											<img src="{{ asset( '/storefront/assets/images/logo/newsletter-logo.svg','@BrandCrockAquaTheme' ) }}" alt="{{config('core.basicInformation.shopName')~'newsletter'}}" width="215" height="85">
										</div>
									{% endif %}
								</div>
							{% endblock %}
							{% block bc_aqua_newsletter_label %}
								<div class="labelwrapper">
									<span class="heading">
										<h4>
											{{ "BrandCrockAquaTheme.footer.newsletterHeading"|trans|sw_sanitize }}
										</h4>
									</span>
									<span>
										<label>
											{{ "BrandCrockAquaTheme.footer.newsletterLableTwo"|trans|sw_sanitize }}
										</label>
									</span>
								</div>
							{% endblock %}
						</div>
					{% endblock %}

					{% block bc_aqua_newsletter_form_box %}
						<div class="bc-aqua-newsletter-form-box  col-12" data-cms-element-id="6fbd92a9ea4a4a683bca51fa50c9f1b4">
							<div class="newsletter-variannt-warpper">
								<div class="cms-block  pos-2 cms-block-form" >
									<div class="cms-block-container">
										<div class="cms-block-container-row row cms-row ">
											<div class="col-12" data-cms-element-id="0f136e87b58a4140bf458b96bc38a5f6">
												<div class="newletter-wrapper cms-element-form">
													<div class="row justify-content-center">
														<div class="col-lg-12">
															<div class="card">
																<div class="card-body">
																	<div class="newsletter-warpper-form">
																	{% block bc_aqua_newsletter_form %}
																		<form action="{{ path('frontend.form.newsletter.register.handle') }}" method="post" data-form-csrf-handler="true" data-form-validation="true" class="bc-aqua-newsletter-form">
																			<div class="newsletter-form-wrapper">
																				{% block bc_aqua_newsletter_email %}
																					{% sw_include '@Storefront/storefront/element/cms-element-form/form-components/cms-element-form-input.html.twig'
																						with {
																							fieldName: 'email',
																							type: 'email',
																							required: true,
																							label: 'newsletter.labelMail',
																							placeholder: 'newsletter.placeholderMail',
																							additionalClass: ''
																						}
																					%}
																				{% endblock %}
																			</div>

																			{% block bc_aqua_newsletter_honeypot %}
																				<input type="text" name="honeypot" value="" class="d-none"/>
																			{% endblock %}

																			{% block bc_aqua_newsletter_captcha %}
																				{% sw_include '@Storefront/storefront/component/captcha/base.html.twig' %}
																			{% endblock %}

																			{% block bc_aqua_newsletter_button %}
																				<button id="btn-sub-newsLetter" type="submit" aria-label="Submit" class="bc-aqua-newsletter-button btn">
																					<span class="btn--icon">
																						<svg xmlns="http://www.w3.org/2000/svg" width="31.849" height="28.694" viewbox="0 0 31.849 28.694">
																							<g id="Ebene_2" data-name="Ebene 2" transform="translate(0 0.002)">
																								<g id="Ebene_1" data-name="Ebene 1" transform="translate(0 -0.002)">
																									<path id="Pfad_302" data-name="Pfad 302" d="M.884,28.692H28.141a3.712,3.712,0,0,0,3.709-3.709V9.86a.873.873,0,0,0-.387-.722.141.141,0,0,0-.042-.035L16.377.122a.888.888,0,0,0-.905,0L.433,9.1h0A.888.888,0,0,0,0,9.86V27.822a.884.884,0,0,0,.884.87Zm.877-17.328,9.189,5.128L1.761,25.67Zm1.261,15.56,9.534-9.534L15.5,19.017a.9.9,0,0,0,.433.113h0a.9.9,0,0,0,.43-.113l2.793-1.564,9.407,9.421a1.821,1.821,0,0,1-.419.049Zm27.056-1.941a1.951,1.951,0,0,1-.141.757L20.78,16.583l9.3-5.22ZM15.923,1.914,29.194,9.828,15.926,17.256,2.656,9.828Z" transform="translate(0 0.002)" fill="#fff"/>
																								</g>
																							</g>
																						</svg>
																					</span>
																					<span class="button--text">
																						{{ "BrandCrockAquaTheme.footer.newsletterbtnText"|trans|sw_sanitize }}
																					</span>
																				</button>
																			{% endblock %}

																			{% block bc_aqua_newsletter_hidden_fields %}
																				<div class="form-hidden-fields">
																					<input type="submit" class="submit--hidden d-none"/>
																					<input type="hidden" name="option" id="newsletterAction" value="{{ constant( 'Shopware\\Storefront\\Controller\\FormController::SUBSCRIBE' ) }}"/>
																				</div>
																			{% endblock %}
																		</form>
																	{% endblock %}
																		{% block bc_aqua_newsletter_privacy_text %}
																			<span class="bc-aqua-newsletter-text">
																				{{ "BrandCrockAquaTheme.footer.newsletterprivacy"|trans|sw_sanitize }}
																			</span>
																		{% endblock %}
																	</div>
																</div>
															</div>
														</div>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
					{% endblock %}
				</div>
			{% endblock %}
		</div>
	{% endif %}
{% endblock %}
