<vn>
<vn-group>
	<db-form id="user-form">
		<db-model property="model" id="user-model" updatable="true">
			SELECT user_id, default_address
				FROM customer_view c
		</db-model>
	</db-form>
	<db-model id="addresses" updatable="true">
		SELECT a.id, a.consignee, p.name province, a.zip_code,
		a.city, a.name, a.active, c.Pais country
			FROM address_view a
			LEFT JOIN vn2008.province p ON a.province_id = p.province_id
			JOIN vn2008.Paises c ON c.Id = p.Paises_Id
				WHERE active != FALSE
	</db-model>
</vn-group>
<h1 id="title">
	_Addresses
</h1>
<div id="actions">
	<htk-bar-button
		icon="add"
		tip="_AddAddress"
		on-click="onAddAddressClick"/>
</div>
<div id="main" class="address-list">
	<div class="card list">
		<htk-radio-group
			id="default-address"
			lot="user-form"
			name="default_address"/>
		<htk-repeater model="addresses">
			<custom>
			<a
				class="list-row"
				href="#!form=account/address&amp;address={{id}}"
				title="_EditAddress">
				<div class="actions">
					<htk-radio
						lot="iter"
						name="id"
						radio-group="default-address"
						tip="_SetAsDefault"/>
					<htk-button
						lot="iter"
						name="id"
						tip="_RemoveAddress"
						icon="delete"
						on-click="onRemoveAddressClick"/>
				</div>
				<p class="important">
					{{consignee}}
				</p>
				<p>
					{{name}}
				</p>
				<p>
					{{zip_code}}, {{city}}
				</p>
			</a>
			</custom>
		</htk-repeater>
	</div>
</div>
</vn>
