<nav class="pushy pushy-left">
  <div class="pushy-content">

    <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">

      {* == PANEL ONE - ACCOUNT == *}

      {if $IS_LOGGED_IN == 'yes'}
      <div class="panel panel-default">
        <div class="panel-heading" role="tab" id="headingOne">
          <h4 class="panel-title">
            <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" onclick="_aff_nav_menu_state('0')" aria-expanded="true" aria-controls="collapseOne">
              <i class="fa fa-user fa-fw"></i> {$TEXT[0]}
            </a>
          </h4>
        </div>
        <div id="collapseOne" class="panel-collapse collapse{$NAV_STATE[0]}" role="tabpanel">
          <div class="panel-body">
            <div><a href="{$META['basehref']}?p=home" title="{$TEXT[5]}"><i class="fa fa-angle-right fa-fw"></i> {$TEXT[5]}</a></div>
            <div><a href="{$META['basehref']}?p=profile" title="{$TEXT[6]}"><i class="fa fa-angle-right fa-fw"></i> {$TEXT[6]}</a></div>
            <div><a href="{$META['basehref']}?p=products" title="{$TEXT[7]}"><i class="fa fa-angle-right fa-fw"></i> {$TEXT[7]}</a></div>
            <div><a href="{$META['basehref']}?p=commissions" title="{$TEXT[8]}"><i class="fa fa-angle-right fa-fw"></i> {$TEXT[8]}</a></div>
            <div><a href="{$META['basehref']}?p=payments" title="{$TEXT[9]}"><i class="fa fa-angle-right fa-fw"></i> {$TEXT[9]}</a></div>
            <div><a href="{$META['basehref']}?p=referrals" title="{$TEXT[10]}"><i class="fa fa-angle-right fa-fw"></i> {$TEXT[10]}</a></div>
            
            {* == CAN AFFILIATE CLOSE ACCOUNT? ADD LINK == *}

            {if $SETTINGS['affdel'] == 'yes'}
            <div><a href="{$META['basehref']}?p=close" title="{$TEXT[12]}"><i class="fa fa-angle-right fa-fw"></i> {$TEXT[12]}</a></div>
            {/if}

            <div><a href="{$META['basehref']}?p=logout" title="{$TEXT[11]}"><i class="fa fa-angle-right fa-fw"></i> {$TEXT[11]}</a></div>
          </div>
        </div>
      </div>

      {else}

      {* == PANEL TWO - LINKS IF NOT LOGGED IN == *}

      <div class="panel panel-default">
        <div class="panel-heading" role="tab" id="headingTwo">
          <h4 class="panel-title">
            <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" onclick="_aff_nav_menu_state('0')" aria-expanded="true" aria-controls="collapseOne">
              <i class="fa fa-user fa-fw"></i> {$TEXT[0]}
            </a>
          </h4>
        </div>
        <div id="collapseOne" class="panel-collapse collapse{$NAV_STATE[0]}" role="tabpanel">
          <div class="panel-body">

            {* == IS ACCOUNT CREATION ENABLED? == *}

            {if $SETTINGS['createaff'] == 'yes'}
            <div><a href="{$META['basehref']}?p=create" title="{$TEXT[4]}"><i class="fa fa-angle-right fa-fw"></i> {$TEXT[4]}</a></div>
            {/if}

            <div><a href="{$META['basehref']}" title="{$TEXT[1]}"><i class="fa fa-angle-right fa-fw"></i> {$TEXT[1]}</a></div>
          </div>
        </div>
      </div>
      {/if}

      {* == PANEL THREE - PAGES IF ENABLED == *}
      
      {if $NAV_PAGES}
      <div class="panel panel-default">
        <div class="panel-heading" role="tab" id="headingThree">
          <h4 class="panel-title">
            <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseThree" onclick="_aff_nav_menu_state('2')" aria-expanded="true" aria-controls="collapseThree">
              <i class="fa fa-file-text fa-fw"></i> {$TEXT[2]}
            </a>
          </h4>
        </div>
        <div id="collapseThree" class="panel-collapse collapse{$NAV_STATE[2]}" role="tabpanel">
          <div class="panel-body">
            {$NAV_PAGES | noescape}
          </div>
        </div>
      </div>
      {/if}

    </div>
  </div>
</nav>

<div class="site-overlay"></div>