<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
    <!-- Include section -->
    <xs:include schemaLocation="urn:magento:module:Magento_Ui:view/base/ui_component/etc/definition/ui_component.xsd"/>

    <xs:complexType name="componentModal">
        <xs:sequence>
            <xs:group ref="configurable" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="settings" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                    <xs:choice minOccurs="0" maxOccurs="unbounded">
                        <xs:group ref="componentModalSettings"/>
                    </xs:choice>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
        <xs:attributeGroup ref="ui_element_attributes"/>
    </xs:complexType>

    <xs:group name="componentModalSettings">
        <xs:choice>
            <xs:group ref="uiCollectionSettings"/>
            <xs:element ref="title">
                <xs:annotation>
                    <xs:documentation>
                        Label displayed in the header of the modal window.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element ref="subTitle"/>
            <xs:element ref="modalClass"/>
            <xs:element ref="onCancel"/>
            <xs:element ref="options">
                <xs:annotation>
                    <xs:documentation>
                        Configuration passed to the modal widget.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="state" type="xs:boolean">
                <xs:annotation>
                    <xs:documentation>
                        Sets the state of the modal window: true for open.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:choice>
    </xs:group>
</xs:schema>
