import { Card, CardHeader, CardTitle, CardDescription, CardContent, Text, Badge, Stack, Separator, Box, Link } from '@jtl-software/platform-ui-react';
import { CircleCheck, CircleAlert, Globe, UserPlus, KeyRound, CloudDownload, Settings, PanelRight } from 'lucide-react';
const routes = [
{ path: '/setup', icon: Settings, description: 'Initial app setup and tenant connection' },
{ path: '/erp', icon: Globe, description: 'ERP integration and data display' },
{ path: '/pane', icon: PanelRight, description: 'Context-aware customer sidebar panel' },
{ path: '/user-example', icon: KeyRound, description: 'Read the signed-in user from the token (claims, access token, userinfo)' },
];
const gettingStartedSteps = [
{
icon: UserPlus,
title: 'Register your app',
description: 'Create your app in the Partner Portal and get your Client ID and Secret.',
linkUrl: 'https://partner.jtl-cloud.com/',
linkLabel: 'Open Partner Portal',
},
{
icon: KeyRound,
title: 'Configure environment',
description: 'Add your credentials to packages/backend/.env',
},
{
icon: CloudDownload,
title: 'Install in JTL-Cloud',
description: "Open the Hub, find your app under 'Apps in development', and install it.",
linkUrl: 'https://hub.jtl-cloud.com/',
linkLabel: 'Open JTL-Cloud Hub',
},
];
const RoutesList: React.FC = () => (
APP ROUTES
{routes.map(route => (
{route.description}
))}
);
const StandaloneWelcome: React.FC = () => (
App is not connected
No AppBridge detected. The app is running locally outside the JTL Platform.
GET STARTED
{gettingStartedSteps.map((step, i) => (
{step.title}
{step.description}
{step.linkUrl && (
{step.linkLabel}
)}
))}
);
const ConnectedWelcome: React.FC = () => (
App is connected
The AppBridge is active and your app is running inside the JTL Platform.
STATUS
AppBridge:
Mode:
ERP Embedded
Navigate using the ERP menu to access app features.
);
const WelcomePage: React.FC<{ connected?: boolean }> = ({ connected = false }) => {
return {connected ? : };
};
export default WelcomePage;