{% extends "_layouts/main" %}

{% block main %}

{% set member = craft.imatrix.member() %}

<div class="container-fluid main-section text-center shop-now" id="login-wrapper">

	<div class="row">
		<div class="col-12 col-md-8 offset-md-2 col-lg-4 offset-lg-4">

                {% set countries = {
                    USA: 'United States',
                    AX: 'Aland Islands',
                    AW: 'Aruba',
                    AU: 'Australia',
                    AT: 'Austria',
                    BS: 'Bahamas',
                    BE: 'Belgium',
                    BO: 'Bolivia',
					BG: 'Bulgaria',
					CA: 'Canada',
					CO: 'Colombia',
                    CR: 'Costa Rica',
                    HR: 'Croatia',
					CW: 'Curacao',
					CY: 'Cyprus',
					CZ: 'Czech Republic',
					DK: 'Denmark',
					DO: 'Dominican Republic',
                    EC: 'Ecuador',
                    SV: 'El Salvador',
					EE: 'Estonia',
					FI: 'Finland',
					FR: 'France',
                    DE: 'Germany',
					GH: 'Ghana',
					GR: 'Greece',
					GT: 'Guatemala',
					HU: 'Hungary',
					IE: 'Ireland',
					IT: 'Italy',
                    KE: 'Kenya',
                    LV: 'Latvia',
					LT: 'Lithuania',
					LU: 'Luxembourg',
					MT: 'Malta',
                    MX: 'Mexico',
                    NL: 'Netherlands',
                    NI: 'Nicaragua',
					NG: 'Nigeria',
                    PK: 'Pakistan',
                    PA: 'Panama',
					PE: 'Peru',
					PH: 'Philippines',
					PL: 'Poland',
                    RO: 'Romania',
                    ZA: 'South Africa',
                    TT: 'Trinidad And Tobago',
                    GB: 'United Kingdom'}
				%}
				<h2 class="mb-4">{{ 'Choose your country:'|t }}</h2>
				<select class="form-control" name="country" id="shop-now-country">
					<option value="" disabled selected>{{ 'Select a country'|t }}</option>
					{% for key,value in countries %}
					<option value="{{ craft.imatrix.memberCartUrl(key)|raw }}">{{ value }}</option>
					{% endfor %}
				</select>
				<a href="{{member.purchase_url}}" target="_blank" class="btn btn-primary" id="shop-now-btn">{{ 'Go to shop'|t }}</a>
		</div>
	</div>

</div>

{% endblock %}