import { __ } from '@wordpress/i18n';

export const WOO_MERGE_TAGS = [
	{
		key: 'order_info',
		groupLabel: __('Order Info', 'pdfdraft-pdf-invoices-for-woocommerce'),
		fields: [
			{ tag: '{{order_id}}', label: __('Order ID', 'pdfdraft-pdf-invoices-for-woocommerce') },
			{
				tag: '{{order_number}}',
				label: __(
					'Order Number',
					'pdfdraft-pdf-invoices-for-woocommerce',
				),
			},
			{
				tag: '{{invoice_number}}',
				label: __('Invoice Number', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{order_date}}',
				label: __('Order Date', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{order_status}}',
				label: __(
					'Order Status (processing, completed, etc.)',
					'pdfdraft-pdf-invoices-for-woocommerce',
				),
			},
			{
				tag: '{{transaction_id}}',
				label: __('Transaction ID', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{payment_method}}',
				label: __('Payment Method Title', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{shipping_method}}',
				label: __('Shipping Method Title', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{currency}}',
				label: __('Currency Code', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
		],
	},
	{
		key: 'billing_info',
		groupLabel: __('Billing Information', 'pdfdraft-pdf-invoices-for-woocommerce'),
		fields: [
			{
				tag: '{{billing_first_name}}',
				label: __('Billing First Name', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{billing_last_name}}',
				label: __('Billing Last Name', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{billing_company}}',
				label: __('Billing Company', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{billing_email}}',
				label: __('Billing Email', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{billing_phone}}',
				label: __('Billing Phone', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{billing_address_1}}',
				label: __('Billing Address Line 1', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{billing_address_2}}',
				label: __('Billing Address Line 2', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{billing_city}}',
				label: __('Billing City', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{billing_state}}',
				label: __('Billing State', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{billing_postcode}}',
				label: __('Billing Postal Code', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{billing_country}}',
				label: __('Billing Country', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{billing_address_full}}',
				label: __('Full Billing Address (Combined)', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
		],
	},
	{
		key: 'shipping_info',
		groupLabel: __('Shipping Information', 'pdfdraft-pdf-invoices-for-woocommerce'),
		fields: [
			{
				tag: '{{shipping_first_name}}',
				label: __('Shipping First Name', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{shipping_last_name}}',
				label: __('Shipping Last Name', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{shipping_company}}',
				label: __('Shipping Company', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{shipping_address_1}}',
				label: __('Shipping Address Line 1', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{shipping_address_2}}',
				label: __('Shipping Address Line 2', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{shipping_city}}',
				label: __('Shipping City', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{shipping_state}}',
				label: __('Shipping State', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{shipping_postcode}}',
				label: __('Shipping Postal Code', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{shipping_country}}',
				label: __('Shipping Country', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{shipping_address_full}}',
				label: __('Full Shipping Address (Combined)', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
		],
	},
	{
		key: 'customer_info',
		groupLabel: __('Customer Info', 'pdfdraft-pdf-invoices-for-woocommerce'),
		fields: [
			{
				tag: '{{customer_id}}',
				label: __('User ID (WordPress User)', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{customer_note}}',
				label: __('Customer Note', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
		],
	},
	{
		key: 'financial_summary',
		groupLabel: __('Financial Summary', 'pdfdraft-pdf-invoices-for-woocommerce'),
		fields: [
			{
				tag: '{{subtotal}}',
				label: __('Subtotal (without tax & shipping)', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{total_tax}}',
				label: __('Total Tax Amount', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{shipping_total}}',
				label: __('Shipping Total', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{total_discount}}',
				label: __('Total Discount', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{grand_total}}',
				label: __('Grand Total (Order Total)', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{total_refunded}}',
				label: __('Refunded Amount (if any)', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{order_total_due}}',
				label: __('Total Due', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
		],
	},
	{
		key: 'order_items',
		groupLabel: __('Order Items (Dynamic Table)', 'pdfdraft-pdf-invoices-for-woocommerce'),
		isDynamic: true,
		fields: [
			{
				tag: '{{item.product_name}}',
				label: __('Product Name', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{ tag: '{{item.sku}}', label: __('SKU', 'pdfdraft-pdf-invoices-for-woocommerce') },
			{
				tag: '{{item.quantity}}',
				label: __('Quantity', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{item.unit_price}}',
				label: __('Unit Price', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{item.line_subtotal}}',
				label: __('Line Subtotal', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{item.line_total}}',
				label: __('Line Total (incl. tax & discounts)', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{item.product_meta}}',
				label: __('Variations / Custom Attributes', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{item.product_image}}',
				label: __('Product Image (Optional)', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{item.variation_data}}',
				label: __('Product Variations (Optional)', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
		],
	},
	{
		key: 'store_info',
		groupLabel: __('Store Info', 'pdfdraft-pdf-invoices-for-woocommerce'),
		fields: [
			{
				tag: '{{store_name}}',
				label: __('WooCommerce Store Name', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{store_address}}',
				label: __('Store Address', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{store_phone}}',
				label: __('Store Phone', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{store_email}}',
				label: __('Store Email', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
			{
				tag: '{{store_logo}}',
				label: __('Store Logo URL', 'pdfdraft-pdf-invoices-for-woocommerce'),
			},
		],
	},
];
