{{#unless @member}}
    <script>
        window.location.href = '{{@site.url}}/signin/';
    </script>
{{/unless}}

<link rel="stylesheet" type="text/css" href="{{asset "css/simple-hero.css"}}"/>
<link rel="stylesheet" type="text/css" href="{{asset "css/account.css"}}"/>

{{!< default}}

<main>
    <div class="wide-container">
        <section class="full-page-section">
            <div class="account-info-container">
                <h1 class="text-card-heading">
                    {{#if @member.name}}
                        {{@member.name}}
                    {{else}}
                        {{t "Your Account"}}
                    {{/if}}
                </h1>

                <p class="account-paragraph-info">
                    {{#if @member.paid}}
                        {{t "You currently have a paid membership, you can find more details in your account settings."}}
                    {{else}}
                        {{t "You currently have a free membership, upgrade to a paid subscription for full access."}}                  
                    {{/if}}
                </p>
                     
                {{#match @custom.account_page_layout "All Data Layout"}}                       
                    {{> "components/account-data"}}
                {{/match}}

                {{#match @custom.account_page_layout "All Data Layout No Subscribe Button"}}
                    {{> "components/account-data"}}
                {{/match}}

                <div class="account-buttons-wrapper">
                    {{#match @custom.account_page_layout "All Data Layout"}}
                        {{#unless @member.paid}}
                            <a {{#match @custom.use_custom_pages "None"}}href="javascript:" data-portal="account/plans"{{else}}href="{{@site.url}}/membership/"{{/match}} class="button account-button account-subscribe-button">
                                {{t "Subscribe"}}
                            </a>
                        {{/unless}}
                    {{/match}}

                    {{#match @custom.account_page_layout "Simple Layout"}}
                        {{#unless @member.paid}}
                            <a {{#match @custom.use_custom_pages "None"}}href="javascript:" data-portal="account/plans"{{else}}href="{{@site.url}}/membership/"{{/match}} class="button account-button account-subscribe-button">
                                {{t "Subscribe"}}
                            </a>
                        {{/unless}}
                    {{/match}}

                    <a href="javascript:" class="button account-button" data-members-signout>
                        {{t "Sign out"}}
                    </a>
                </div>

                <a href="javascript:" data-portal="account" class="account-settings-button">
                    <small>
                        {{t "Account settings"}}
                    </small>            
                </a>
            </div>
        </section>
    </div>
</main>