<?php
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
?>
<div data-bind="scope: 'messages'">
    <div data-bind="foreach: { data: cookieMessages, as: 'message' }" class="messages">
        <div role="alert" data-bind="attr: {
            class: 'alert-' + message.type + ' ' + message.type + ' alert',
            'data-ui-id': 'message-' + message.type
        }">
            <span data-bind="html: message.text"></span>
        </div>
    </div>
    <div data-bind="foreach: { data: messages().messages, as: 'message' }" class="messages">
        <div data-bind="attr: {
            class: 'alert-' + message.type + ' ' + message.type + ' alert',
            'data-ui-id': 'message-' + message.type
        }">
            <span data-bind="html: message.text"></span>
        </div>
    </div>
</div>
<script type="text/x-magento-init">
    {
        "*": {
            "Magento_Ui/js/core/app": {
                "components": {
                        "messages": {
                            "component": "Magento_Theme/js/view/messages"
                        }
                    }
                }
            }
    }
</script>
