<?php
/**
 * Plugin panel : Payout notification settings
 *
 * @package YITH\PayPalPayouts
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

$notification_opt = array(
	'payout-notification' => array(
		'notification_section_start' => array(
			'type'  => 'title',
			'title' => __( 'Receiver Notification', 'yith-paypal-payouts-for-woocommerce' ),
		),
		'notification_subject'       => array(
			'title'             => __( 'Notification subject', 'yith-paypal-payouts-for-woocommerce' ),
			'type'              => 'yith-field',
			'yith-type'         => 'text',
			'desc'              => __( 'This is the email subject that PayPal will send to your receivers when sending the payouts. (Max 255 characters.)', 'yith-paypal-payouts-for-woocommerce' ),
			'default'           => __( 'You have a payment!', 'yith-paypal-payouts-for-woocommerce' ),
			'custom_attributes' => array(
				'maxlength' => 255,
			),
			'id'                => 'yith_payouts_notification_subject',
		),
		'notification_content'       => array(
			'title'             => __( 'Notification content', 'yith-paypal-payouts-for-woocommerce' ),
			'type'              => 'yith-field',
			'yith-type'         => 'textarea',
			'desc'              => __( 'This is the email content that PayPal will send to your receivers when sending the payouts. (Max 1000 characters.)', 'yith-paypal-payouts-for-woocommerce' ),
			'default'           => __( 'You have received a payout! Thanks.', 'yith-paypal-payouts-for-woocommerce' ),
			'custom_attributes' => array(
				'maxlength' => 1000,
			),
			'id'                => 'yith_payouts_notification_content',
		),
		'notification_section_end'   => array(
			'type' => 'sectionend',
		),
	),
);

if ( defined( 'YITH_WPV_PREMIUM' ) ) {
	$placeholder_list = "<code>".implode("</code><code>", array('{order_id}','{commission_ids}'))."</code>";
	$placeholders_desc = sprintf(_x('%1$sAvailable placeholders:%2$s %3$s', 'Placeholders list','yith-paypal-payouts-for-woocommerce'),'<p><strong>','</strong>', $placeholder_list.'</p>' );
	$notification_opt['payout-notification']['multivendor_notification_section_start'] = array(
		'type' => 'title',
		'name' => __( 'Vendor Notification', 'yith-paypal-payouts-for-woocommerce' ),
	);
	$notification_opt['payout-notification']['vendor_commission_notification_subject'] = array(
		'title'             => __( 'Vendor notification subject', 'yith-paypal-payouts-for-woocommerce' ),
		'type'              => 'yith-field',
		'yith-type'         => 'text',
		'desc'              => __( 'This is the email subject that PayPal will send to your vendors when sending the payouts. (Max 255 characters.)', 'yith-paypal-payouts-for-woocommerce' ),
		'default'           => __( 'You have a payment!', 'yith-paypal-payouts-for-woocommerce' ),
		'custom_attributes' => array(
			'maxlength' => 255,
		),
		'id'                => 'yith_payouts_vendor_notification_subject',
	);
	$notification_opt['payout-notification']['vendor_commission_notification_content'] = array(
		'title'             => __( 'Vendor notification content', 'yith-paypal-payouts-for-woocommerce' ),
		'type'              => 'yith-field',
		'yith-type'         => 'textarea',
		'desc'              => __( 'This is the email content that PayPal will send to your vendors when sending the payouts. (Max 1000 characters.)', 'yith-paypal-payouts-for-woocommerce' ).$placeholders_desc,
		'default'           => __( 'You have received a payout! Thanks.', 'yith-paypal-payouts-for-woocommerce' ),
		'custom_attributes' => array(
			'maxlength' => 1000,
		),
		'id'                => 'yith_payouts_vendor_notification_content',
	);
	$notification_opt['payout-notification']['multivendor_notfication_section_end']    = array(
		'type' => 'sectionend',
	);
}
if ( defined( 'YITH_WCAF_PREMIUM' ) ) {
	$placeholder_list = "<code>{commission_ids}</code>";
	$placeholders_desc = sprintf(_x('%1$sAvailable placeholders:%2$s %3$s', 'Placeholders list','yith-paypal-payouts-for-woocommerce'),'<p><strong>','</strong>', $placeholder_list.'</p>' );
	$notification_opt['payout-notification']['affiliate_notification_section_start']      = array(
		'type' => 'title',
		'name' => __( 'Affiliate Notification', 'yith-paypal-payouts-for-woocommerce' ),
	);
	$notification_opt['payout-notification']['affiliate_commission_notification_subject'] = array(
		'title'             => __( 'Affiliate notification subject', 'yith-paypal-payouts-for-woocommerce' ),
		'type'              => 'yith-field',
		'yith-type'         => 'text',
		'desc'              => __( 'This is the email subject that PayPal will send to your affiliates when sending the payouts. (Max 255 characters.)', 'yith-paypal-payouts-for-woocommerce' ),
		'default'           => __( 'You have a payment!', 'yith-paypal-payouts-for-woocommerce' ),
		'custom_attributes' => array(
			'maxlength' => 255,
		),
		'id'                => 'yith_payouts_affiliate_notification_subject',
	);
	$notification_opt['payout-notification']['affiliate_commission_notification_content'] = array(
		'title'             => __( 'Affiliate notification content', 'yith-paypal-payouts-for-woocommerce' ),
		'type'              => 'yith-field',
		'yith-type'         => 'textarea',
		'desc'              => __( 'This is the email content that PayPal will send to your affiliates when sending the payouts. (Max 1000 characters.)', 'yith-paypal-payouts-for-woocommerce' ).$placeholders_desc,
		'default'           => __( 'You have received a payout! Thanks.', 'yith-paypal-payouts-for-woocommerce' ),
		'custom_attributes' => array(
			'maxlength' => 1000,
		),
		'id'                => 'yith_payouts_affiliates_notification_content',
	);
	$notification_opt['payout-notification']['affiliate_notfication_section_end']         = array(
		'type' => 'sectionend',
	);
}

return $notification_opt;
