<?xml version="1.0"?>
<!--
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magento.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magento.com for more information.
 *
 * @category    design
 * @package     base_default
 * @copyright   Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
-->
<layout version="1.0.0.0">
    <oauth_root_handle>
        <reference name="root">
            <action method="setTemplate">
                <template>page/1column.phtml</template>
            </action>
        </reference>
        <reference name="head">
            <action method="removeItem"><type>js</type><name>lib/ccard.js</name></action>
            <action method="removeItem"><type>js</type><name>scriptaculous/controls.js</name></action>
            <action method="removeItem"><type>js</type><name>scriptaculous/builder.js</name></action>
            <action method="removeItem"><type>js</type><name>scriptaculous/dragdrop.js</name></action>
            <action method="removeItem"><type>js</type><name>scriptaculous/controls.js</name></action>
            <action method="removeItem"><type>js</type><name>scriptaculous/slider.js</name></action>
            <action method="removeItem"><type>js</type><name>varien/js.js</name></action>
            <action method="removeItem"><type>js</type><name>varien/menu.js</name></action>
        </reference>
        <remove name="top.links"/>
        <remove name="top.search"/>
        <remove name="top.menu"/>
        <remove name="footer"/>
    </oauth_root_handle>

    <oauth_root_handle_simple>
        <remove name="js_cookie" />
        <block type="page/html" name="root" output="toHtml" template="page/empty.phtml">
            <block type="page/html_head" name="head" as="head" template="oauth/authorize/head-simple.phtml">
                <action method="addCss"><stylesheet>css/oauth-simple.css</stylesheet></action>
            </block>
            <block type="core/text_list" name="content"/>
        </block>
    </oauth_root_handle_simple>

    <!-- Authorization -->
    <oauth_authorize_index translate="label">
        <update handle="oauth_root_handle"/>
        <label>OAuth authorization for customer</label>
        <reference name="content">
            <block type="oauth/authorize" name="oauth.authorize.form" template="oauth/authorize/form/login.phtml"/>
            <block type="oauth/authorize_button" name="oauth.authorize.button" template="oauth/authorize/button.phtml" />
        </reference>
    </oauth_authorize_index>

    <oauth_authorize_simple translate="label">
        <update handle="oauth_root_handle_simple"/>
        <remove name="header"/>
        <label>OAuth authorization Pop Up for customer</label>
        <reference name="content">
            <block type="oauth/authorize" name="oauth.authorize.form" template="oauth/authorize/form/login-simple.phtml"/>
            <block type="oauth/authorize_button" name="oauth.authorize.button" template="oauth/authorize/button-simple.phtml" />
        </reference>
    </oauth_authorize_simple>
    <!-- EOF Authorization -->

    <!-- Confirm Authorization -->
    <oauth_authorize_confirm translate="label">
        <update handle="oauth_root_handle"/>
        <label>Confirm OAuth token authorization</label>
        <reference name="content">
            <block type="oauth/authorize_button" name="oauth.authorize.confirm" template="oauth/authorize/confirm.phtml"/>
        </reference>
    </oauth_authorize_confirm>

    <oauth_authorize_confirmsimple translate="label">
        <update handle="oauth_root_handle_simple"/>
        <remove name="header"/>
        <reference name="content">
            <block type="oauth/authorize_button" name="oauth.authorize.confirm" template="oauth/authorize/confirm-simple.phtml"/>
        </reference>
    </oauth_authorize_confirmsimple>
    <!-- EOF Confirm Authorization -->

    <!-- Reject Authorization -->
    <oauth_authorize_reject translate="label">
        <update handle="oauth_root_handle"/>
        <label>Reject OAuth token authorization</label>
        <reference name="content">
            <block type="oauth/authorize_button" name="oauth.authorize.reject" template="oauth/authorize/reject.phtml"/>
        </reference>
    </oauth_authorize_reject>

    <oauth_authorize_rejectsimple translate="label">
        <update handle="oauth_root_handle_simple"/>
        <remove name="header"/>
        <reference name="content">
            <block type="oauth/authorize_button" name="oauth.authorize.reject" template="oauth/authorize/reject-simple.phtml"/>
        </reference>
    </oauth_authorize_rejectsimple>
    <!-- EOF Reject Authorization -->

    <!-- My Applications-->
    <customer_account>
        <reference name="customer_account_navigation">
            <action method="addLink" translate="label" module="oauth">
                <name>OAuth Customer Tokens</name>
                <path>oauth/customer_token</path>
                <label>My Applications</label>
            </action>
        </reference>
    </customer_account>

    <oauth_customer_token_index translate="label">
        <label>Customer My Account My OAuth Applications</label>
        <update handle="customer_account"/>
        <reference name="my.account.wrapper">
            <block type="oauth/customer_token_list" name="oauth_customer_token_list" template="oauth/customer/token/list.phtml"/>
        </reference>
    </oauth_customer_token_index>
    <!-- EOF My Applications-->
</layout>
