2024-10-28 15:44:27 +01:00
|
|
|
import { __ } from '@wordpress/i18n';
|
|
|
|
import Onboarding from './Onboarding/Onboarding';
|
2024-10-28 16:09:09 +01:00
|
|
|
import TabDashboard from './Dashboard/TabDashboard';
|
|
|
|
import TabPaymentMethods from './Dashboard/TabPaymentMethods';
|
|
|
|
import TabSettings from './Dashboard/TabSettings';
|
|
|
|
import TabStyling from './Dashboard/TabStyling';
|
2024-10-28 15:44:27 +01:00
|
|
|
|
|
|
|
export const getSettingsTabs = () => {
|
|
|
|
const tabs = [];
|
|
|
|
|
|
|
|
// TODO: Use the store to find out if onboarding is complete
|
|
|
|
|
|
|
|
if ( 0 ) {
|
|
|
|
tabs.push( {
|
|
|
|
name: 'onboarding',
|
|
|
|
component: <Onboarding />,
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( 1 ) {
|
|
|
|
tabs.push( {
|
|
|
|
name: 'dashboard',
|
|
|
|
title: __( 'Dashboard', 'woocommerce-paypal-payments' ),
|
2024-10-28 16:09:09 +01:00
|
|
|
component: <TabDashboard />,
|
2024-10-28 15:44:27 +01:00
|
|
|
} );
|
|
|
|
|
|
|
|
tabs.push( {
|
|
|
|
name: 'payment-methods',
|
|
|
|
title: __( 'Payment Methods', 'woocommerce-paypal-payments' ),
|
2024-10-28 16:09:09 +01:00
|
|
|
component: <TabPaymentMethods />,
|
2024-10-28 15:44:27 +01:00
|
|
|
} );
|
|
|
|
|
|
|
|
tabs.push( {
|
|
|
|
name: 'settings',
|
|
|
|
title: __( 'Settings', 'woocommerce-paypal-payments' ),
|
2024-10-28 16:09:09 +01:00
|
|
|
component: <TabSettings />,
|
2024-10-28 15:44:27 +01:00
|
|
|
} );
|
|
|
|
|
|
|
|
tabs.push( {
|
|
|
|
name: 'styling',
|
|
|
|
title: __( 'Styling', 'woocommerce-paypal-payments' ),
|
2024-10-28 16:09:09 +01:00
|
|
|
component: <TabStyling />,
|
2024-10-28 15:44:27 +01:00
|
|
|
} );
|
|
|
|
}
|
|
|
|
|
|
|
|
return tabs;
|
|
|
|
};
|