<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title><?php esc_html_e('Document', 'kirilkirkov-pdf-invoice-manager'); ?> <?php echo esc_html(sanitize_text_field($invoice['invoice_number'])); ?></title>
    <style>
      @font-face {
        font-family: 'DejaVu Sans';
        font-style: normal; 
        src: url('<?php echo esc_url(plugin_dir_path( __FILE__ ) . '../../../../Fonts/DejaVuSans.ttf'); ?>') format('truetype');
      }
      .invoice-box * {
        font-family: 'DejaVu Sans';
      }
      <?php 
        // CSS content from trusted internal plugin file
        // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
        echo file_get_contents(plugin_dir_path( __FILE__ ) . '../../../Assets/Css/preview-invoice.css');
      ?>

      .invoice-box .main-inv-container { padding: 0; }

      .invoice-box .invoice-creative { padding: 0; font-size: 10px; }
      .invoice-box .invoice-creative .my-firm-info { font-size: 10px; }
      .invoice-box .invoice-creative .row-my-firm .firm-name { font-size: 14px; }
      .invoice-box .invoice-creative .invoice-type {font-size: 11;}
      .invoice-box .invoice-creative .invoice-totals {font-size: 11px;}
      .invoice-box .invoice-creative .invoice-totals .final-total td { font-size: 12px; }
      .invoice-box .invoice-creative .row-invoice-info .origin { font-size: 16px; }

      .invoice-box .invoice-classic .top-part {padding-top:20px;}
      .invoice-box .invoice-classic .top-part .firm-logo {max-width:250px;}
      .invoice-box .invoice-classic {padding: 0;}
      .invoice-box .invoice-classic { padding: 0; font-size: 10px; }
      .invoice-box .invoice-classic .my-firm-info { font-size: 10px; width: 230px; }
      .invoice-box .invoice-classic .client-info { width: 130px; }
      .invoice-box .invoice-classic .inv-info { float:right; }
      .invoice-box .invoice-classic .row-my-firm .firm-name { font-size: 14px; }
      .invoice-box .invoice-classic .invoice-type {font-size: 11;}
      .invoice-box .invoice-classic .invoice-totals {font-size: 11px;}
      .invoice-box .invoice-classic .invoice-totals .final-total td { font-size: 12px; }
      .invoice-box .invoice-classic .origin {font-size: 16px;}
      .invoice-box .invoice-classic .top-part .invoice-type {font-size: 24px;}
      
      .invoice-box .invoice-apple {padding: 0;}
      .invoice-box .invoice-apple .firm-logo {padding-top:20px;}
      .invoice-box .invoice-apple { padding: 0; font-size: 10px; }
      .invoice-box .invoice-apple .my-firm-info { font-size: 10px; }
      .invoice-box .invoice-apple .row-my-firm .firm-name { font-size: 14px; }
      .invoice-box .invoice-apple .invoice-type {font-size: 11;}
      .invoice-box .invoice-apple .invoice-totals {font-size: 11px;}
      .invoice-box .invoice-apple .invoice-totals .final-total td { font-size: 12px; }
      .invoice-box .invoice-apple .inv-info .origin {font-size: 16px;}

      .invoice-box .invoice-designer {padding: 0;}
      .invoice-box .invoice-designer .inv-info { float:right; text-align: right; }
      .invoice-box .invoice-designer .my-firm-info {width: 130px;}
      .invoice-box .invoice-designer .firm-logo {padding-top:20px;}
      .invoice-box .invoice-designer { padding: 0; font-size: 10px; }
      .invoice-box .invoice-designer .my-firm-info { font-size: 10px; }
      .invoice-box .invoice-designer .row-my-firm .firm-name { font-size: 14px; }
      .invoice-box .invoice-designer .invoice-type {font-size: 11;}
      .invoice-box .invoice-designer .invoice-totals {font-size: 11px;}
      .invoice-box .invoice-designer .invoice-totals .final-total td { font-size: 12px; }
      .invoice-box .invoice-designer .origin {font-size: 16px;}
    </style>
  </head>
  <body>
    <div class="main-inv-container">
        <div class="invoice-box">
            <?php 
              $kirilkirkovwipdf_is_download = true;
              $kirilkirkovwipdf_choosed_template = get_option($Config::INPUTS_PREFIX.'current_template');
              $kirilkirkovwipdf_round_to_decimals = (int)get_option( $Config::INPUTS_PREFIX.'count_decimal_digits' );
              $kirilkirkovwipdf_numbers_format_system_ = $Config::get_numbers_format_system();

              if(!$kirilkirkovwipdf_choosed_template || $kirilkirkovwipdf_choosed_template === 'creative') {
                require 'Design/Creative.php'; 
              }
              if($kirilkirkovwipdf_choosed_template && $kirilkirkovwipdf_choosed_template === 'apple') {
                require 'Design/Apple.php'; 
              }
              if($kirilkirkovwipdf_choosed_template && $kirilkirkovwipdf_choosed_template === 'classic') {
                require 'Design/Classic.php'; 
              }
              if($kirilkirkovwipdf_choosed_template && $kirilkirkovwipdf_choosed_template === 'designer') {
                require 'Design/Designer.php'; 
              }
            ?>
        </div>
    </div>
  </body>
</html>