<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<control xmlns="http://www.sap.com/sap.ui.library.xsd">
    <name>CustomerContext</name>
    <derived/>
    <documentation>This control allows you to open a dialog containing a list of customers for users to pick.
The chosen selected customer is persisted using sap.ushell services that shall be fully configured outside of this control.

The dialog can be open following two modes:
"select" : exiting without choosing a customer is firing the customerSelected event with a null customer before closing the dialog
"change" : exiting without choosing a customer is simply closing the dialog

When opening the dialog in "select" mode, if a customer has been persisted in a previous session, it will be retrieved and the dialog won't open at all.</documentation>
    <deprecation since="1.24.3">This control is not required anymore as per central UX requirements.
Please use Contextual Filter design instead!
This control will not be supported anymore.</deprecation>
    <baseType>sap.ui.core/Control</baseType>
    <properties>
        <property name="personalizationPageName" type="sap.ui.core/string" defaultValue="AppCustomerContext" group="Misc">
            <documentation>Name of your app that shall be unique.</documentation>
        </property>
        <property name="showSalesArea" type="sap.ui.core/boolean" defaultValue="false" group="Misc">
            <documentation>Display or not the customers sales area as well as its name and id.</documentation>
        </property>
        <property name="path" type="sap.ui.core/string" defaultValue="/Customers" group="Misc">
            <documentation>Model path to the customer collection to be displayed</documentation>
        </property>
        <property name="customerIDProperty" type="sap.ui.core/string" defaultValue="CustomerID" group="Misc">
            <documentation>Property name of the customer ID</documentation>
        </property>
        <property name="customerNameProperty" type="sap.ui.core/string" defaultValue="CustomerName" group="Misc">
            <documentation>Property name of the customer name</documentation>
        </property>
        <property name="salesOrganizationNameProperty" type="sap.ui.core/string" defaultValue="SalesOrganizationName" group="Misc">
            <documentation>Property name of the sales organization name</documentation>
        </property>
        <property name="distributionChannelNameProperty" type="sap.ui.core/string" defaultValue="DistributionChannelName" group="Misc">
            <documentation>Property name of the distribution channel name</documentation>
        </property>
        <property name="divisionNameProperty" type="sap.ui.core/string" defaultValue="DivisionName" group="Misc">
            <documentation>Property name of the division name</documentation>
        </property>
        <property name="dialogTitle" type="sap.ui.core/string" group="Misc">
            <documentation>Overrides the default Dialog title</documentation>
        </property>
    </properties>
    <events>
        <event name="customerSelected" allowPreventDefault="false">
            <documentation>Fired when a customer is selected in the list. The fired customer can be empty in case the user press the cancel button while the Customer Context has been open using select()</documentation>
        </event>
    </events>
    <methods>
        <method name="setModel" type="sap.ui.core/void">
            <documentation>Setter for the control model</documentation>
        </method>
        <method name="select" type="sap.ui.core/void">
            <documentation>Open the Customer Context dialog and fires a null customerSelected if the cancel button is clicked</documentation>
        </method>
        <method name="change" type="sap.ui.core/void">
            <documentation>Open the Customer Context dialog</documentation>
        </method>
        <method name="reset" type="sap.ui.core/void">
            <documentation>Delete the user selected customer</documentation>
        </method>
    </methods>
</control>
