<mvc:View
		height="100%"
		controllerName="sap.m.sample.WizardBranching.controller.WizardBranching"
		xmlns:layout="sap.ui.layout"
		xmlns:form="sap.ui.layout.form"
		xmlns:mvc="sap.ui.core.mvc"
		xmlns="sap.m">
	<NavContainer id="wizardNavContainer">
		<pages>
			<Page
					id="wizardContentPage"
					showHeader="false">
				<content>
					<Wizard id="ShoppingCartWizard"
							complete="completedHandler"
							enableBranching="true"
							class="sapUiResponsivePadding--header sapUiResponsivePadding--content">
						<WizardStep
								id="ContentsStep"
								nextStep="PaymentTypeStep"
								title="Shopping cart contents"
								icon="sap-icon://cart">
							<ObjectHeader
									title="Total"
									number="{/ProductsTotalPrice}"
									numberUnit="EUR">
								<attributes>
									<ObjectAttribute	text="This is the list of items in your shopping cart" />
								</attributes>
							</ObjectHeader>
							<List mode="Delete"
									items="{/ProductCollection}"
									enableBusyIndicator="true"
									delete="handleDelete"
									headerText="Items">
								<StandardListItem
										title="{Name}"
										type="Active"
										description="{Description}"
										icon="{ProductPicUrl}"
										info="{Price} {CurrencyCode}"
										iconDensityAware="false"
										iconInset="false" />
							</List>
						</WizardStep>
						<WizardStep
								id="PaymentTypeStep"
								title="Payment type"
								subsequentSteps="CreditCardStep, BankAccountStep, CashOnDeliveryStep"
								complete="goToPaymentStep"
								icon="sap-icon://money-bills">
							<Text class="sapUiSmallMarginBottom"
									text="We accept all major credit cards. No extra cost will be charged when paying with a credit card. Bank transfer and Cash on delivery are only possible for inland deliveries. A service charge of 2.99 EUR will be charged for these types of deliveries. Be aware, that for Bank transfers, the shipping will start on the day after the payment is received."/>
							<HBox
									alignItems="Center"
									justifyContent="Center"
									width="100%">
								<SegmentedButton selectionChange="setPaymentMethod" id="paymentMethodSelection" selectedKey="{/selectedPayment}">
									<items>
										<SegmentedButtonItem key="Credit Card" icon="sap-icon://credit-card" text="Credit card" />
										<SegmentedButtonItem key="Bank Transfer" icon="sap-icon://official-service" text="Bank transfer" />
										<SegmentedButtonItem key="Cash on Delivery" icon="sap-icon://money-bills" text="Cash on delivery" />
									</items>
								</SegmentedButton>
							</HBox>
						</WizardStep>
						<WizardStep
								id="CreditCardStep"
								title="Credit card info"
								nextStep="BillingStep"
								activate="checkCreditCardStep"
								icon="sap-icon://credit-card">
							<MessageStrip text="Enter at least 3 symbols for credit card name." />
							<form:SimpleForm
									editable="true">
								<Label text="Name on card" required="true" />
								<Input value="{/CreditCard/Name}" liveChange="checkCreditCardStep" valueLiveUpdate="true" />
								<Label text="Card number"/>
								<Input value="{/CardNumber}" />
								<Label text="Security code" />
								<Input value="{/CreditCard/SecurityCode}" />
								<Label text="Expiration date" />
								<DatePicker value="{/CreditCard/Expire}" />
							</form:SimpleForm>
						</WizardStep>
						<WizardStep
								id="BankAccountStep"
								title="Beneficial bank info"
								nextStep="BillingStep"
								icon="sap-icon://official-service">
							<Panel>
								<headerToolbar>
									<Toolbar height="0rem">
										<Title text=""/>
									</Toolbar>
								</headerToolbar>
								<layout:Grid
										defaultSpan="L6 M6 S10"
										hSpacing="2">
									<Label text="Beneficiary Name" design="Bold" />
									<Label text="Singapore Hardware e-Commerce LTD" />
									<Label text="Beneficiary Bank" design="Bold" />
									<Label text="CITY BANK, SINGAPORE BRANCH" />
									<Label text="Beneficiary Account Number" design="Bold" />
									<Label text="06110702027218" />
									<Label text="Bank Phone Number" design="Bold" />
									<Label text="+65-6224-2622" />
									<Label text="Bank Email Address" design="Bold" />
									<Label text="customerservice@citybank.com" />
								</layout:Grid>
							</Panel>
						</WizardStep>
						<WizardStep
								id="CashOnDeliveryStep"
								title="Cash on delivery info"
								nextStep="BillingStep"
								activate="checkCashOnDeliveryStep"
								icon="sap-icon://money-bills">
							<MessageStrip text="Enter at least 3 symbols for first name." />
							<form:SimpleForm
									editable="true">
								<Label text="First Name" required="true" />
								<Input value="{/CashOnDelivery/FirstName}" liveChange="checkCashOnDeliveryStep" valueLiveUpdate="true" />
								<Label text="Last Name" />
								<Input value="{/CashOnDelivery/LastName}" />
								<Label text="Phone Number" />
								<Input value="{/CashOnDelivery/Phone Number}" />
								<Label text="Email address" />
								<Input value="{/CashOnDelivery/Email}" />
							</form:SimpleForm>
						</WizardStep>
						<WizardStep
								id="BillingStep"
								title="Billing address"
								subsequentSteps="DeliveryAddressStep, DeliveryTypeStep"
								activate="checkBillingStep"
								complete="billingAddressComplete"
								icon="sap-icon://sales-quote">
							<MessageStrip text="Enter at least 3 symbols for each required field" />
							<form:SimpleForm
									editable="true">
								<Label text="Delivery address is different" />
								<CheckBox
										selected="{/differentDeliveryAddress}"
										select="setDifferentDeliveryAddress"/>
								<Label text="Address" required="true" />
								<Input value="{/BillingAddress/Address}" liveChange="checkBillingStep" valueLiveUpdate="true" />
								<Label text="City" required="true" />
								<Input value="{/BillingAddress/City}" liveChange="checkBillingStep" valueLiveUpdate="true" />
								<Label text="Zip Code" required="true" />
								<Input value="{/BillingAddress/ZipCode}" liveChange="checkBillingStep" valueLiveUpdate="true" />
								<Label text="Country" required="true" />
								<Input value="{/BillingAddress/Country}" liveChange="checkBillingStep" valueLiveUpdate="true" />
								<Label text="Note" required="false" />
								<TextArea rows="8" value="{/BillingAddress/Note}" />
							</form:SimpleForm>
						</WizardStep>
						<WizardStep
								id="DeliveryAddressStep"
								title="Delivery address"
								nextStep="DeliveryTypeStep"
								icon="sap-icon://sales-quote">
							<form:SimpleForm
									editable="true">
								<Label text="Address" />
								<Input />
								<Label text="City" />
								<Input />
								<Label text="Zip Code" />
								<Input />
								<Label text="Country" />
								<Input />
								<Label text="Note" />
								<TextArea rows="8" />
							</form:SimpleForm>
						</WizardStep>
						<WizardStep
								id="DeliveryTypeStep"
								title="Delivery type"
								icon="sap-icon://insurance-car">
							<Text class="sapUiSmallMarginBottom"
									text="Standard delivery will be delivered within 5 workdays. Be aware, that around high-season sales, standard delivery may take up to one additional day. Express delivery is delivered within 36 hours. A service fee of 5.49 EUR is charged for Express delivery on a workday. For a holiday delivery, the service fee is 8,00 EUR. Express delivery is only available for inland deliveries. All service fees vary for deliveries  abroad."/>
							<HBox
									alignItems="Center"
									justifyContent="Center"
									width="100%">
								<SegmentedButton selectedKey="{/selectedDeliveryMethod}">
									<items>
										<SegmentedButtonItem key="Standard Delivery" text="Standard" />
										<SegmentedButtonItem key="Express Delivery" text="Express" />
									</items>
								</SegmentedButton>
							</HBox>
						</WizardStep>
					</Wizard>
				</content>
				<footer>
					<OverflowToolbar>
						<ToolbarSpacer/>
						<Button text="Cancel" press="handleWizardCancel"/>
					</OverflowToolbar>
				</footer>
			</Page>
			<Page id="wizardBranchingReviewPage" showHeader="false">
				<content>
					<form:SimpleForm
							title="1. List of products"
							minWidth="1024"
							editable="false"
							layout="ResponsiveGridLayout">
						<List mode="None"
								items="{/ProductCollection}"
								enableBusyIndicator="true">
							<StandardListItem
									title="{Name}"
									type="Active"
									description="{Description}"
									icon="{ProductPicUrl}"
									info="{Price} {CurrencyCode}"
									iconDensityAware="false"
									iconInset="false" />
						</List>
						<ObjectHeader
								title="Total"
								number="{/ProductsTotalPrice}"
								numberUnit="EUR">
							<attributes>
								<ObjectAttribute
										press="_navBackToList"
										active="true"
										text="Edit" />
							</attributes>
						</ObjectHeader>
					</form:SimpleForm>

					<form:SimpleForm
							title="2. Payment type"
							minWidth="1024"
							editable="false"
							layout="ResponsiveGridLayout">
						<form:content>
							<Label text="Chosen payment type"/>
							<Text text="{/selectedPayment}"/>
							<Link press="_navBackToPaymentType" text="Edit" />
						</form:content>
					</form:SimpleForm>

					<form:SimpleForm
							visible="{= ${/selectedPayment}==='Credit Card' ? true : false}"
							title="3. Credit Card payment"
							minWidth="1024"
							editable="false"
							layout="ResponsiveGridLayout">
						<form:content>
							<Label text="Name on card"/>
							<Text text="{/CreditCard/Name}"/>
							<Label text="Card number"/>
							<Text text="{/CardNumber}"/>
							<Label text="Security code"/>
							<Text text="{/CreditCard/SecurityCode}"/>
							<Label text="Expiration date"/>
							<Text text="{/CreditCard/Expire}"/>
							<Link press="_navBackToCreditCard" text="Edit" />
						</form:content>
					</form:SimpleForm>

					<form:SimpleForm
							visible="{= ${/selectedPayment}==='Bank Transfer' ? true : false}"
							title="3. Bank Transfer"
							minWidth="1024"
							editable="false"
							layout="ResponsiveGridLayout">
						<form:content>
								<layout:Grid
										defaultSpan="L6 M6 S10"
										hSpacing="2">
									<Label text="Beneficiary Name" design="Bold" />
									<Label text="Singapore Hardware e-Commerce LTD" />
									<Label text="Beneficiary Bank" design="Bold" />
									<Label text="CITY BANK, SINGAPORE BRANCH" />
									<Label text="Beneficiary Account Number" design="Bold" />
									<Label text="06110702027218" />
									<Label text="Bank Phone Number" design="Bold" />
									<Label text="+65-6224-2622" />
									<Label text="Bank Email Address" design="Bold" />
									<Label text="customerservice@citybank.com" />
								</layout:Grid>
						</form:content>
					</form:SimpleForm>

					<form:SimpleForm
							visible="{= ${/selectedPayment}==='Cash on Delivery' ? true : false}"
							title="3. Cash on delivery"
							minWidth="1024"
							editable="false"
							layout="ResponsiveGridLayout">
						<form:content>
							<Label text="First Name"/>
							<Text text="{/CashOnDelivery/FirstName}"/>
							<Label text="Last Name"/>
							<Text text="{/CashOnDelivery/LastName}"/>
							<Label text="Phone number"/>
							<Text text="{/CashOnDelivery/Phone Number}"/>
							<Label text="Email address"/>
							<Text text="{/CashOnDelivery/Email}"/>
							<Link press="_navBackToCashOnDelivery" text="Edit" />
						</form:content>
					</form:SimpleForm>

					<form:SimpleForm
							title="4. Billing Address"
							minWidth="1024"
							editable="false"
							layout="ResponsiveGridLayout">
						<form:content>
							<Label text="Address"/>
							<Text text="{/BillingAddress/Address}"/>
							<Label text="City"/>
							<Text text="{/BillingAddress/City}"/>
							<Label text="Zip Code"/>
							<Text text="{/BillingAddress/ZipCode}"/>
							<Label text="Country"/>
							<Text text="{/BillingAddress/Country}"/>
							<Label text="Note"/>
							<Text text="{/BillingAddress/Note}"/>
							<Link press="_navBackToBillingAddress" text="Edit" />
						</form:content>
					</form:SimpleForm>

					<form:SimpleForm
							title="5. Delivery type"
							minWidth="1024"
							editable="false"
							layout="ResponsiveGridLayout">
						<form:content>
							<Label text="Chosen delivery type"/>
							<Text text="{/selectedDeliveryMethod}"/>
							<Link press="_navBackToDeliveryType" text="Edit" />
						</form:content>
					</form:SimpleForm>

				</content>
				<footer>
					<Bar>
						<contentRight>
							<Button text="Submit" press="handleWizardSubmit"/>
							<Button text="Cancel" press="handleWizardCancel"/>
						</contentRight>
					</Bar>
				</footer>
			</Page>
		</pages>
	</NavContainer>
</mvc:View>
