2024-11-26 13:28:03 +01:00
import { _ _ } from '@wordpress/i18n' ;
2024-11-28 10:31:16 +01:00
const cartAndExpressCheckoutSettings = {
2024-11-26 13:28:03 +01:00
paymentMethods : [ ] ,
2024-11-28 10:31:16 +01:00
style : {
shape : 'pill' ,
label : 'paypal' ,
color : 'gold' ,
} ,
2024-11-26 13:28:03 +01:00
} ;
2024-11-28 10:31:16 +01:00
const settings = {
2024-11-26 13:28:03 +01:00
paymentMethods : [ ] ,
2024-11-28 10:31:16 +01:00
style : {
layout : 'vertical' ,
shape : cartAndExpressCheckoutSettings . style . shape ,
label : cartAndExpressCheckoutSettings . style . label ,
color : cartAndExpressCheckoutSettings . style . color ,
tagline : false ,
} ,
2024-11-26 13:28:03 +01:00
} ;
export const defaultLocationSettings = {
cart : {
value : 'cart' ,
label : _ _ ( 'Cart' , 'woocommerce-paypal-payments' ) ,
settings : { ... cartAndExpressCheckoutSettings } ,
2024-12-17 16:55:30 +04:00
// translators: %s: Link to Cart page
description : _ _ (
'Customize the appearance of the PayPal smart buttons on the <a href="%s">[MISSING LINK]Cart page</a> and select which additional payment buttons to display in this location.' ,
'wooocommerce-paypal-payments'
) ,
descriptionLink : '#' ,
2024-11-26 13:28:03 +01:00
} ,
'classic-checkout' : {
value : 'classic-checkout' ,
label : _ _ ( 'Classic Checkout' , 'woocommerce-paypal-payments' ) ,
settings : { ... settings } ,
2024-12-17 16:55:30 +04:00
// translators: %s: Link to Classic Checkout page
description : _ _ (
'Customize the appearance of the PayPal smart buttons on the <a href="%s">[MISSING LINK]Classic Checkout page</a> and choose which additional payment buttons to display in this location.' ,
'wooocommerce-paypal-payments'
) ,
descriptionLink : '#' ,
2024-11-26 13:28:03 +01:00
} ,
'express-checkout' : {
value : 'express-checkout' ,
label : _ _ ( 'Express Checkout' , 'woocommerce-paypal-payments' ) ,
settings : { ... cartAndExpressCheckoutSettings } ,
2024-12-17 16:55:30 +04:00
// translators: %s: Link to Express Checkout location
description : _ _ (
'Customize the appearance of the PayPal smart buttons on the <a href="%s">[MISSING LINK]Express Checkout location</a> and choose which additional payment buttons to display in this location.' ,
'wooocommerce-paypal-payments'
) ,
descriptionLink : '#' ,
2024-11-26 13:28:03 +01:00
} ,
'mini-cart' : {
value : 'mini-cart' ,
label : _ _ ( 'Mini Cart' , 'woocommerce-paypel-payements' ) ,
settings : { ... settings } ,
2024-12-17 16:55:30 +04:00
// translators: %s: Link to Mini Cart
description : _ _ (
'Customize the appearance of the PayPal smart buttons on the <a href="%s">[MISSING LINK]Mini Cart</a> and choose which additional payment buttons to display in this location.' ,
'wooocommerce-paypal-payments'
) ,
descriptionLink : '#' ,
2024-11-26 13:28:03 +01:00
} ,
'product-page' : {
value : 'product-page' ,
label : _ _ ( 'Product Page' , 'woocommerce-paypal-payments' ) ,
settings : { ... settings } ,
2024-12-17 16:55:30 +04:00
// translators: %s: Link to Product Page
description : _ _ (
'Customize the appearance of the PayPal smart buttons on the <a href="%s">[MISSING LINK]Product Page</a> and choose which additional payment buttons to display in this location.' ,
'wooocommerce-paypal-payments'
) ,
descriptionLink : '#' ,
2024-11-26 13:28:03 +01:00
} ,
} ;
export const paymentMethodOptions = [
{
value : 'venmo' ,
label : _ _ ( 'Venmo' , 'woocommerce-paypal-payments' ) ,
} ,
{
2024-11-28 11:15:10 +01:00
value : 'paylater' ,
2024-11-26 13:28:03 +01:00
label : _ _ ( 'Pay Later' , 'woocommerce-paypal-payments' ) ,
} ,
{
2024-11-28 11:15:10 +01:00
value : 'googlepay' ,
2024-11-26 13:28:03 +01:00
label : _ _ ( 'Google Pay' , 'woocommerce-paypal-payments' ) ,
} ,
{
2024-11-28 11:15:10 +01:00
value : 'applepay' ,
2024-11-26 13:28:03 +01:00
label : _ _ ( 'Apple Pay' , 'woocommerce-paypal-payments' ) ,
} ,
] ;
export const buttonLabelOptions = [
{
value : 'paypal' ,
label : _ _ ( 'PayPal' , 'woocommerce-paypal-payments' ) ,
} ,
{
value : 'checkout' ,
label : _ _ ( 'Checkout' , 'woocommerce-paypal-payments' ) ,
} ,
{
2024-11-28 10:31:16 +01:00
value : 'buynow' ,
2024-11-26 13:28:03 +01:00
label : _ _ ( 'PayPal Buy Now' , 'woocommerce-paypal-payments' ) ,
} ,
{
2024-11-28 10:31:16 +01:00
value : 'pay' ,
2024-11-26 13:28:03 +01:00
label : _ _ ( 'Pay with PayPal' , 'woocommerce-paypal-payments' ) ,
} ,
] ;
export const colorOptions = [
{
value : 'gold' ,
label : _ _ ( 'Gold (Recommended)' , 'woocommerce-paypal-payments' ) ,
} ,
{
value : 'blue' ,
label : _ _ ( 'Blue' , 'woocommerce-paypal-payments' ) ,
} ,
{
value : 'silver' ,
label : _ _ ( 'Silver' , 'woocommerce-paypal-payments' ) ,
} ,
{
value : 'black' ,
label : _ _ ( 'Black' , 'woocommerce-paypal-payments' ) ,
} ,
{
value : 'white' ,
label : _ _ ( 'White' , 'woocommerce-paypal-payments' ) ,
} ,
] ;
export const buttonLayoutOptions = [
{
label : _ _ ( 'Vertical' , 'woocommerce-paypal-payments' ) ,
value : 'vertical' ,
} ,
{
label : _ _ ( 'Horizontal' , 'woocommerce-paypal-payments' ) ,
value : 'horizontal' ,
} ,
] ;
export const shapeOptions = [
{
value : 'pill' ,
label : _ _ ( 'Pill' , 'woocommerce-paypal-payments' ) ,
} ,
{
2024-11-28 10:31:16 +01:00
value : 'rect' ,
2024-11-26 13:28:03 +01:00
label : _ _ ( 'Rectangle' , 'woocommerce-paypal-payments' ) ,
} ,
] ;