<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

$selected_base = get_post_meta($post_id,'cal_base_currency', true );
$selected_target = get_post_meta($post_id,'cal_target_currency', true );
$sidebar= get_post_meta($post_id,'cal_verticle_style', true );
$font_color = get_post_meta($post_id, 'font_color', true);
$background_color = get_post_meta( $post_id, 'back_color',true );
$veritclecls='';
if($sidebar==true){
    $veritclecls = 'ccpw_vrtcl-calculator';

}

$data = array(
    'type'=>$type,
    'baseCurrency'      => $selected_base,
    'targetCurrency'    => $selected_target,
    'background'        =>$background_color,
    'fontColor'         =>$font_color
);

$unique_id = uniqid();
$output = '<div class="ccpw_react_widget ccpw_calculator '.$veritclecls.'" id="ccpw_react_widgets_'.$post_id.'_'.$unique_id.'" data-attribute=' . htmlspecialchars(json_encode($data)) . '></div>';
