<?php
/**
* @package CembraPay Payment Gateway for WooCommerce
* @author  Adrian Emil Tudorache
* @license GPL-2.0+
* @link    https://www.tudorache.me/
**/

namespace CembraPayWoo;

if ( ! defined( 'ABSPATH' ) ) {
    header( 'Status: 403 Forbidden' );
	header( 'HTTP/1.1 403 Forbidden' );
    exit;
}
$lang = Service::get_language();

$tc_label  = 'Terms and Conditions';
$tc_link   = 'https://www.cembrapay.ch/en/terms/CP';
$priv_label = 'Data Privacy Policy of CembraPay';
$priv_link = 'https://www.cembrapay.ch/en/privacy';

$privacy = 'I have read and accept the <a href="https://www.cembrapay.ch/en/terms/CP" target="_blank" rel="noopener noreferrer">Terms and Conditions</a> and the <a href="https://www.cembrapay.ch/en/privacy" target="_blank" rel="noopener noreferrer">Data Privacy Policy of CembraPay</a>.';

switch( $lang ) {
    case 'de':
        $privacy = 'Ich akzeptiere die <a href="https://www.cembrapay.ch/de/terms/CP" target="_blank" rel="noopener noreferrer">AGB</a> und die <a href="https://www.cembrapay.ch/de/privacy" target="_blank" rel="noopener noreferrer">Datenschutzerklärung von CembraPay</a>.';
    break;
    case 'fr':
        $privacy = 'J\'ai pris connaissance et j\'accepte les <a href="https://www.cembrapay.ch/fr/terms/CP" target="_blank" rel="noopener noreferrer">CG</a> et <a href="https://www.cembrapay.ch/fr/privacy" target="_blank" rel="noopener noreferrer">la politique de confidentialité de CembraPay</a>.';
    break;
    case 'it':
        $privacy = 'Confermo di aver letto e di accettare accettato le <a href="https://www.cembrapay.ch/it/terms/CP" target="_blank" rel="noopener noreferrer">CG</a> e <a href="https://www.cembrapay.ch/it/privacy" target="_blank" rel="noopener noreferrer">l\'Informativa sulla privacy di CembraPay</a>.';
    break;
}
?>
<div class="form-row form-row-wide cembrapay-tc" style="margin-bottom: 10px;">
    <label for="cembrapay-tc">
        <input type="checkbox" name="cembrapay-tc" value="1" id="cembrapay-tc" class="cembrapay-tc" /> 
        <span><?php echo $privacy; ?></span>
    </label>
</div>