@model AddressModel
<div class="edit-address form-horizontal">
    <input class="address-id" asp-for="Id" type="hidden" />
    <div class="form-group">
        <label class="control-label col-sm-2 col-md-2" asp-for="FirstName" asp-postfix=":"></label>
        <div class="visible-xs form-title-rquired"><nop-required /></div>
        <div class="col-sm-6 col-md-6">
            <input class="form-control" asp-for="FirstName" />
        </div>
        <div class="col-sm-4 col-md-4">
            <div class="visible-lg visible-md visible-sm form-title-rquired"><nop-required /></div>
            <span asp-validation-for="FirstName"></span>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-sm-2 col-md-2" asp-for="LastName" asp-postfix=":"></label>
        <div class="visible-xs form-title-rquired"><nop-required /></div>
        <div class="col-sm-6 col-md-6">
            <input class="form-control" asp-for="LastName" />
        </div>
        <div class="col-sm-4 col-md-4">
            <div class="visible-lg visible-md visible-sm form-title-rquired"><nop-required /></div>
            <span asp-validation-for="LastName"></span>
        </div>

    </div>
    <div class="form-group">
        <label class="control-label col-sm-2 col-md-2" asp-for="Email" asp-postfix=":"></label>
        <div class="visible-xs form-title-rquired"><nop-required /></div>
        <div class="col-sm-6 col-md-6">
            <input class="form-control" asp-for="Email" />
        </div>
        <div class="col-sm-4 col-md-4">
            <div class="visible-lg visible-md visible-sm form-title-rquired"><nop-required /></div>
            <span asp-validation-for="Email"></span>
        </div>
    </div>
    @if (Model.CompanyEnabled)
    {
        <div class="form-group">
            <label class="control-label col-sm-2 col-md-2" asp-for="Company" asp-postfix=":"></label>
            @if (Model.CompanyRequired)
            {
                <div class="visible-xs form-title-rquired"><nop-required /></div>
            }
            <div class="col-sm-6 col-md-6">
                <input class="form-control" asp-for="Company" />
            </div>
            <div class="col-sm-4 col-md-4">
                @if (Model.CompanyRequired)
                {
                    <div class="visible-lg visible-md visible-sm form-title-rquired"><nop-required /></div>
                }
                <span asp-validation-for="Company"></span>
            </div>
        </div>
    }
    @if (Model.CountryEnabled)
    {
        <div class="form-group">
            <label class="control-label col-sm-2 col-md-2" asp-for="CountryId" asp-postfix=":"></label>
            <div class="visible-xs form-title-rquired"><nop-required /></div>
            <div class="col-sm-6 col-md-6">
                <select class="form-control dropdown-toggle form-control category-iteam category-select" asp-for="CountryId" asp-items="Model.AvailableCountries"
                    data-trigger="country-select"
                    data-url="@(Url.RouteUrl("GetStatesByCountryId"))"
                    data-stateprovince="#@Html.IdFor(model => model.StateProvinceId)"
                    data-loading="#states-loading-progress"></select>
            </div>
            <div class="col-sm-4 col-md-4">
                <div class="visible-lg visible-md visible-sm form-title-rquired"><nop-required /></div>
                <span asp-validation-for="CountryId"></span>
            </div>
        </div>
    }

    @if (Model.CountryEnabled && Model.StateProvinceEnabled)
    {
        <div class="form-group">
            <label class="control-label col-sm-2 col-md-2" asp-for="StateProvinceId" asp-postfix=":"></label>
            <div class="col-sm-6 col-md-6">
                <select class="form-control dropdown-toggle category-iteam form-control category-select" asp-for="StateProvinceId" asp-items="Model.AvailableStates" data-trigger="state-select"></select>
                <span id="states-loading-progress" style="display: none;" class="please-wait">@T("Common.Wait")</span>
            </div>
            <div class="col-sm-4 col-md-4">
                <span asp-validation-for="StateProvinceId"></span>
            </div>
        </div>
    }
    @if (Model.CountyEnabled)
    {
        <div class="form-group">
            <label class="control-label col-sm-2 col-md-2" asp-for="County" asp-postfix=":"></label>
            @if (Model.CountyRequired)
            {
                <div class="visible-xs form-title-rquired"><nop-required /></div>
            }
            <div class="col-sm-6 col-md-6">
                <input class="form-control" asp-for="County" />
            </div>
            <div class="col-sm-4 col-md-4">
                @if (Model.CountyRequired)
                {
                <div class="visible-lg visible-md visible-sm form-title-rquired"><nop-required /></div>
                }
                <span asp-validation-for="County"></span>
            </div>
        </div>
    }
    @if (Model.CityEnabled)
    {
        <div class="form-group">
            <label class="control-label col-sm-2 col-md-2" asp-for="City" asp-postfix=":"></label>
            @if (Model.CityRequired)
            {
                <div class="visible-xs form-title-rquired"><nop-required /></div>
            }
            <div class="col-sm-6 col-md-6">
                <input class="form-control" asp-for="City" />
            </div>
            <div class="col-sm-4 col-md-4">
                @if (Model.CityRequired)
                {
                    <div class="visible-lg visible-md visible-sm form-title-rquired"><nop-required /></div>
                }
                <span asp-validation-for="City"></span>
            </div>
        </div>
    }
    @if (Model.StreetAddressEnabled)
    {
        <div class="form-group">
            <label class="control-label col-sm-2 col-md-2" asp-for="Address1" asp-postfix=":"></label>
            @if (Model.StreetAddressRequired)
            {
                <div class="visible-xs form-title-rquired"><nop-required /></div>
            }
            <div class="col-sm-6 col-md-6">
                <input class="form-control" asp-for="Address1" />
            </div>
            <div class="col-sm-4 col-md-4">
                @if (Model.StreetAddressRequired)
                {
                    <div class="visible-lg visible-md visible-sm form-title-rquired"><nop-required /></div>
                }
                <span asp-validation-for="Address1"></span>
            </div>
        </div>
    }
    @if (Model.StreetAddress2Enabled)
    {
        <div class="form-group">
            <label class="control-label col-sm-2 col-md-2" asp-for="Address2" asp-postfix=":"></label>
            @if (Model.StreetAddress2Required)
            {
                <div class="visible-xs form-title-rquired"><nop-required /></div>
            }
            <div class="col-sm-6 col-md-6">
                <input class="form-control" asp-for="Address2" />
            </div>
            <div class="col-sm-4 col-md-4">
                @if (Model.StreetAddress2Required)
                {
                    <div class="visible-lg visible-md visible-sm form-title-rquired"><nop-required /></div>
                }
                <span asp-validation-for="Address2"></span>
            </div>
        </div>
    }
    @if (Model.ZipPostalCodeEnabled)
    {
        <div class="form-group">
            <label class="control-label col-sm-2 col-md-2" asp-for="ZipPostalCode" asp-postfix=":"></label>
            @if (Model.ZipPostalCodeRequired)
            {
                <div class="visible-xs form-title-rquired"><nop-required /></div>
            }
            <div class="col-sm-6 col-md-6">
                <input class="form-control" asp-for="ZipPostalCode" />
            </div>
            <div class="col-sm-4 col-md-4">
                @if (Model.ZipPostalCodeRequired)
                {
                    <div class="visible-lg visible-md visible-sm form-title-rquired"><nop-required /></div>
                }
                <span asp-validation-for="ZipPostalCode"></span>
            </div>
        </div>
    }
    @if (Model.PhoneEnabled)
    {
        <div class="form-group">
            <label class="control-label col-sm-2 col-md-2" asp-for="PhoneNumber" asp-postfix=":"></label>
            @if (Model.PhoneRequired)
            {
                <div class="visible-xs form-title-rquired"><nop-required /></div>
            }
            <div class="col-sm-6 col-md-6">
                <input class="form-control" asp-for="PhoneNumber" />
            </div>
            <div class="col-sm-4 col-md-4">
                @if (Model.PhoneRequired)
                {
                    <div class="visible-lg visible-md visible-sm form-title-rquired"><nop-required /></div>
                }
                <span asp-validation-for="PhoneNumber"></span>
            </div>
        </div>
    }
    @if (Model.FaxEnabled)
    {
        <div class="form-group">
            <label class="control-label col-sm-2 col-md-2" asp-for="FaxNumber" asp-postfix=":"></label>
            @if (Model.FaxRequired)
            {
                <div class="visible-xs form-title-rquired"><nop-required /></div>
            }
            <div class="col-sm-6 col-md-6">
                <input class="form-control" asp-for="FaxNumber" />
            </div>
            <div class="col-sm-4 col-md-4">
                @if (Model.FaxRequired)
                {
                    <div class="visible-lg visible-md visible-sm form-title-rquired"><nop-required /></div>
                }
                <span asp-validation-for="FaxNumber"></span>
            </div>
        </div>
    }
    @if (Model.CustomAddressAttributes.Count > 0)
    {
        @await Html.PartialAsync("_AddressAttributes", Model.CustomAddressAttributes)
    }
    @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.AddressBottom, additionalData = Model })
</div>