<?php
//no direct access
defined('_JEXEC') or die('Restricted access.'); ?>
<div v-show="current_action == 'edit'">

	<div class="btn-group">

	  <button class="btn btn-default"
	  				@click.prevent="preview_prev()"
						:disabled="!exists_prev()"
						title="<?php echo JText::_('PREV_INVOICE');?>"
            data-toggle="tooltip"
	  >
	  	<span class="glyphicon glyphicon-chevron-left"></span>
	  </button>

		<button class="btn btn-default"
	  				@click.prevent="preview_next()"
						:disabled="!exists_next()"
						title="<?php echo JText::_('NEXT_INVOICE');?>"
            data-toggle="tooltip"
	  >
	  	<span class="glyphicon glyphicon-chevron-right"></span>
	  </button>

	</div>

	<div class="btn-group pull-right">

	  <button class="btn btn-default mainsendbutton"
		  			@click.prevent="email_invoice(current_invoice.id)"
		  			v-show="current_invoice.to_email"
		  			:id="'mainsendbutton' + current_invoice.id"
		  			data-loading-text="<?php echo JText::_('SENDING'); ?>"
	  >
	  	<span class="glyphicon glyphicon-envelope"></span> <?php echo JText::_('SEND'); ?>
	  </button>

		<button class="btn btn-default mainprintbutton"
		  			@click.prevent="print_invoice(current_invoice.id)"
		  			:id="'mainprintbutton' + current_invoice.id"
		  			data-loading-text="<?php echo JText::_('PRINTING'); ?>"
	  >
	  	<span class="glyphicon glyphicon-print"></span> <?php echo JText::_('PRINT'); ?>
	  </button>

	  <a :href="current_invoice.pdf_link"
	  	 class="btn btn-default"
	  	 v-show="current_invoice.pdf_link"
	  >
	  	<span class="glyphicon glyphicon-download-alt"></span> <?php echo JText::_('PDF'); ?>
	  </a>

	</div>

	<div class="btn-group pull-right">
	  <a :href="current_invoice.public_link"
	  	 target="_blank"
	  	 class="btn btn-default"
	  >
	  	<span class="glyphicon glyphicon-share-alt"></span> <?php echo JText::_('OPEN_LINK'); ?>
	  </a>
	</div>
</div>
