<?php

// Prevent Direct Access
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

$fields = [];

// -------------- Fields

$fields[] = array(
	'name' => esc_html__('Rating', 'maxo-fa'),
	'id'   => 'price_stars',
	'type' => 'select',
	'options' => array(
		'1'    => esc_html__('1 Star', 'maxo-fa'),
		'2'    => esc_html__('2 Stars', 'maxo-fa'),
		'3'    => esc_html__('3 Stars', 'maxo-fa'),
		'4'    => esc_html__('4 Stars', 'maxo-fa'),
		'5'	   => esc_html__('5 Stars', 'maxo-fa'),
		'hide' => esc_html__("Don't Show", 'maxo-fa'),
	),
	'placeholder' => esc_html__('Select', 'maxo-fa'),
	'std' 		  => 'hide',
);

$fields[] = array(
	'name'  => esc_html__('Price', 'maxo-fa'),
	'id'    => 'price_amount',
	'type'  => 'text',
);

$fields[] = array(
	'name'  => esc_html__('Unit', 'maxo-fa'),
	'id'    => 'price_unit',
	'type'  => 'text',
	'std'   => esc_html_x('$', 'currency', 'maxo-fa'),
);

$fields[] = array(
	'name'  => esc_html__('Duration', 'maxo-fa'),
	'id'    => 'price_duration',
	'type'  => 'text',
	'std'   => esc_html__('Monthly', 'maxo-fa'),
);

$fields[] = array(
	'type' => 'custom_html',
	'std'  => '<div style="margin-bottom:20px"></div>',
);

$fields[] = array(
	'name'    => esc_html__('Features', 'maxo-fa'),
	'id'      => 'price_features',
	'type'    => 'text',
	'clone' => true,
);

$fields[] = array(
	'type' => 'custom_html',
	'std'  => '<div style="margin-bottom:20px"></div>',
);

$fields[] = array(
	'name'  => esc_html__('Buy Button Text', 'maxo-fa'),
	'id'    => 'price_button_text',
	'type'  => 'text',
);

$fields[] = array(
	'name'  => esc_html__('Buy Button Link', 'maxo-fa'),
	'id'    => 'price_button_link',
	'type'  => 'text',
);

$fields[] = array(
	'name'  => esc_html__('Display as Special', 'maxo-fa'),
	'id'    => 'price_special',
	'type'  => 'checkbox',
);

// -------------- Metabox

$meta_boxes[] = array(
	'id'         => 'maxo_price',
	'title'      => esc_html__('Price Info', 'maxo-fa'),
	'post_types' => 'price',
	'fields' => $fields,
);
