<?php 
$titles = __('error_titles', true);
$bodies = __('error_bodies', true);
$companyTokens = array(
	'{CompanyName}' => array('notifications_company_token_name', 'company name'),
	'{CompanyLogo}' => array('notifications_company_token_logo', 'company logo'),
	'{CompanyAddress}' => array('notifications_company_token_address', 'company address'),
	'{CompanyZip}' => array('notifications_company_token_zip', 'company ZIP or postal code'),
	'{CompanyCity}' => array('notifications_company_token_city', 'company city'),
	'{CompanyCountry}' => array('notifications_company_token_country', 'company country'),
	'{CompanyState}' => array('notifications_company_token_state', 'company state or region'),
	'{CompanyPhone}' => array('notifications_company_token_phone', 'company phone number'),
	'{CompanyEmail}' => array('notifications_company_token_email', 'company email address'),
	'{CompanyUrl}' => array('notifications_company_token_url', 'company website URL'),
);
?>
<style>
.sc-notification-token-group + .sc-notification-token-group { margin-top: 4px; }
.sc-notification-token-title { margin: 0; font-size: inherit; font-weight: 700; color: #333; text-transform: uppercase; }
.sc-notification-token-list { margin: 0; padding: 0; list-style: none; }
.sc-notification-token-list li { line-height: inherit; }
.sc-notification-token-list small { color: inherit; font-size: inherit; }
</style>
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-sm-12">
        <div class="row">
            <div class="col-lg-9 col-md-8 col-sm-6">
                <h2><?php __('infoNotificationsTitle'); ?></h2>
            </div>
            <div class="col-lg-3 col-md-4 col-sm-6 btn-group-languages">
                <?php if ($tpl['is_flag_ready']) : ?>
				<div class="multilang"></div>
				<?php endif; ?>
        	</div>
        </div><!-- /.row -->

        <p class="m-b-none"><i class="fa fa-info-circle"></i><?php __('infoNotificationsDesc'); ?></p>
    </div><!-- /.col-md-12 -->
</div>

<div class="wrapper wrapper-content animated fadeInRight" id="boxNotificationsWrapper">
	<div class="ibox float-e-margins settings-box">
		<div class="ibox-content ibox-heading">
			<h3><?php __('notifications_main_title'); ?></h3>
			<small><?php __('notifications_main_subtitle'); ?></small>
		</div>

		<div class="ibox-content">
			<div class="row">
				<div class="col-lg-3 col-sm-5">
					<div class="m-b-sm">
						<div class="row">
							<div class="col-sm-12">
							<h3><?php __('notifications_recipient'); ?></h3>
							</div>
						</div>
					</div>
			
					<div class="form-group">
						<div class="radio radio-primary">
							<input type="radio" id="recipient_client" name="recipient" value="client"<?php echo !isset($tpl['query']['recipient']) || $tpl['query']['recipient'] == 'client' ? ' checked' : NULL; ?>>
							<label for="recipient_client"><?php __('recipients_ARRAY_client'); ?></label>
						</div>
					</div>

					<div class="form-group">
						<div class="radio radio-primary">
							<input type="radio" id="recipient_admin" name="recipient" value="admin"<?php echo isset($tpl['query']['recipient']) && $tpl['query']['recipient'] == 'admin' ? ' checked' : NULL; ?>>
							<label for="recipient_admin"><?php __('recipients_ARRAY_admin'); ?></label>
						</div>
					</div>
				</div>

				<div class="col-lg-9 col-sm-7" id="boxNotificationsMetaData">
				
				</div>
			</div>
		</div>
	</div>

	<div class="row">
		<div class="col-lg-9" id="boxNotificationsContent">
		   
		</div>
	
		<div class="col-lg-3">
			<div class="ibox float-e-margins settings-box sc-notification-token-panel">
				<div class="ibox-content ibox-heading">
					<h3><?php __('notifications_tokens'); ?></h3>
	
					<small><?php __('notifications_tokens_note'); ?></small>
				</div>
				<div class="ibox-content">
					<div class="sc-notification-token-group">
						<div class="scNotifyTokens scBookingTokens">
							<?php __('opt_o_email_body_text'); ?>
						</div>
						<div class="scNotifyTokens scAccountTokens">
							<?php __('opt_o_account_email_body_text'); ?>
						</div>
						<div class="scNotifyTokens scSendToFriendTokens">
							<?php __('opt_o_send_to_friend_email_body_text'); ?>
						</div>
					</div>
					<div class="sc-notification-token-group">
						<div class="col-xs-12">
							<h4 class="sc-notification-token-title"><?php $companyTokenTitle = __('notifications_company_tokens', true); echo pjSanitize::html(!empty($companyTokenTitle) ? $companyTokenTitle : 'Company tokens'); ?></h4>
							<ul class="sc-notification-token-list">
								<?php foreach ($companyTokens as $token => $label): ?>
									<?php $tokenLabel = __($label[0], true); ?>
									<li><small><?php echo pjSanitize::html($token); ?> - <?php echo pjSanitize::html(!empty($tokenLabel) ? $tokenLabel : $label[1]); ?>;</small></li>
								<?php endforeach; ?>
							</ul>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

<?php if ($tpl['is_flag_ready']) : ?>
<script type="text/javascript">
var pjCmsLocale = pjCmsLocale || {};
pjCmsLocale.langs = <?php echo $tpl['locale_str']; ?>;
pjCmsLocale.flagPath = "<?php echo PJ_FRAMEWORK_LIBS_PATH; ?>pj/img/flags/";
</script>
<?php endif; ?>
