import * as React from 'react';
import {
Link,
Route,
Navigate,
Routes,
useParams,
useMatch,
useNavigate,
} from 'react-router-dom';
import { useTheme } from '@mui/material/styles';
import useMediaQuery from '@mui/material/useMediaQuery';
import Box from '@mui/material/Box';
import Grid from '@mui/material/Grid';
import Tabs from '@mui/material/Tabs';
import Tab from '@mui/material/Tab';
import useFormatMessage from 'hooks/useFormatMessage';
import * as URLS from 'config/urls';
import AppIcon from 'components/AppIcon';
import Container from 'components/Container';
import PageTitle from 'components/PageTitle';
import AdminApplicationSettings from 'components/AdminApplicationSettings';
import AdminApplicationAuthClients from 'components/AdminApplicationAuthClients';
import AdminApplicationCreateAuthClient from 'components/AdminApplicationCreateAuthClient';
import AdminApplicationUpdateAuthClient from 'components/AdminApplicationUpdateAuthClient';
import useApp from 'hooks/useApp';
export default function AdminApplication() {
const theme = useTheme();
const matchSmallScreens = useMediaQuery(theme.breakpoints.down('md'));
const formatMessage = useFormatMessage();
const navigate = useNavigate();
const connectionsPathMatch = useMatch({
path: URLS.ADMIN_APP_CONNECTIONS_PATTERN,
end: false,
});
const settingsPathMatch = useMatch({
path: URLS.ADMIN_APP_SETTINGS_PATTERN,
end: false,
});
const authClientsPathMatch = useMatch({
path: URLS.ADMIN_APP_AUTH_CLIENTS_PATTERN,
end: false,
});
const { appKey } = useParams();
const { data, loading } = useApp(appKey);
const app = data?.data || {};
const goToAuthClientsPage = () => navigate('auth-clients');
if (loading) return null;
return (
<>
{app.name}
}
/>
}
/>
App connections}
/>
}
/>
}
/>
}
/>
>
);
}