"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = __importDefault(require("react"));
const react_router_dom_1 = require("react-router-dom");
const content_1 = __importDefault(require("./content"));
const file_1 = __importDefault(require("./file"));
const folder_1 = __importDefault(require("./folder"));
function Projects() {
    const { applicationId } = (0, react_router_dom_1.useParams)();
    const contentLocation = {
        pathname: '/applications/:applicationId/projects/content',
        search: `?applicationId=${applicationId}`,
    };
    const fileLocation = {
        pathname: '/applications/:applicationId/projects/detail',
        search: `?applicationId=${applicationId}`,
    };
    const folderLocation = {
        pathname: '/applications/:applicationId/projects/list',
        search: `?applicationId=${applicationId}`,
    };
    return (react_1.default.createElement(react_router_dom_1.Switch, null,
        react_1.default.createElement(react_router_dom_1.Route, { path: "/applications/:applicationId/projects/content", location: contentLocation, component: content_1.default }),
        react_1.default.createElement(react_router_dom_1.Route, { path: "/applications/:applicationId/projects/detail", location: fileLocation, component: file_1.default }),
        react_1.default.createElement(react_router_dom_1.Route, { path: "/applications/:applicationId/projects/list", location: folderLocation, component: folder_1.default }),
        react_1.default.createElement(react_router_dom_1.Redirect, { from: "/*", to: `/applications/${applicationId}/projects/list?applicationId=${applicationId}` })));
}
exports.default = Projects;
