{strip} {$_config = $config.shipping} {$_system_address_field_names = $config->getSystemAddressFieldNames()} {$_errors = []} {if !empty($error_step_id) && $error_step_id === "region"}{$_errors = $errors}{/if} {$_countries = []} {if !empty($region.countries)}{$_countries = $region.countries}{/if} {$_active_location = null} {$_active_county = null} {$_active_region = null} {if isset($region.selected_values.location_id)} {foreach $region.locations as $_location} {if $_location.id == $region.selected_values.location_id} {$_active_location = $_location} {/if} {/foreach} {if empty($_active_location)} {$_active_location = reset($region.locations)} {/if} {/if} {$_is_default_mode = true} {$_is_minimal_mode = false} {if $config.shipping.mode == shopCheckoutConfig::SHIPPING_MODE_TYPE_MINIMUM} {$_is_default_mode = false} {$_is_minimal_mode = true} {/if} {$_is_country_required = true} {$_is_region_required = true} {$_is_city_required = true} {$_is_zip_required = true} {function name="_echo_size_class" _size=""} {$_size_class = "size-medium"} {if !empty($_size)} {if $_size == shopCheckoutConfig::FIELD_WIDTH_MINI} {$_size_class = "size-mini"} {elseif $_size == shopCheckoutConfig::FIELD_WIDTH_SMALL} {$_size_class = "size-small"} {elseif $_size == shopCheckoutConfig::FIELD_WIDTH_MEDIUM} {$_size_class = "size-medium"} {elseif $_size == shopCheckoutConfig::FIELD_WIDTH_LARGE} {$_size_class = "size-large"} {/if} {/if} {$_size_class} {/function} {function name="_render_label" _label="" _required=false} {if !empty($_required)} {$_label|default:""|escape} {else} {$_label|default:""|escape} {/if} {/function} {capture assign="_zip_field"} {if !empty($region.ask_zip)}
{/if} {/capture} {$_hide_region = !empty($_hide_region) || !empty($region.disabled)}
{* HEADER *}
{* BODY *} {$_nothing_to_change = false} {if $_is_minimal_mode && isset($region.locations) && count($region.locations) === 1} {if !empty($_active_location.country_id) && !(empty($_active_location.region_id) && empty($_active_location.region) ) && !(empty($_active_location.city_id) && empty($_active_location.city) ) && empty($region.ask_zip)} {$_nothing_to_change = true} {/if} {/if}
{if empty($region.disabled)} {if $_is_default_mode} {elseif $_is_minimal_mode} {$_region_value = $_active_location.region_id} {if !empty($_active_location.region)}{$_region_value = $_active_location.region}{/if} {$_city_value = $_active_location.city_id} {if !empty($_active_location.city)}{$_city_value = $_active_location.city}{/if} {/if} {* @event checkout_render_region *} {foreach $event_hook.region as $_} {/foreach} {/if}
{/strip}