/* eslint-disable */

// @ts-nocheck

import { lazy } from "react";
import type { Path } from "react-router-dom";
import { generateEncodedPath } from "../../utils/generateEncodedPath";
import type { AppRouteObject } from "../../routes";

export type ExecutorParams = {
  realm: string;
  profileName: string;
  executorName: string;
};

const ExecutorForm = lazy(() => import("../ExecutorForm"));

export const ExecutorRoute: AppRouteObject = {
  path: "/:realm/realm-settings/client-policies/:profileName/edit-profile/:executorName",
  element: <ExecutorForm />,
  handle: {
    access: ["manage-realm"],
    breadcrumb: (t) => t("executorDetails"),
  },
};

export const toExecutor = (params: ExecutorParams): Partial<Path> => ({
  pathname: generateEncodedPath(ExecutorRoute.path, params),
});
