import React, { useEffect } from "react";
import { useTranslation } from "react-i18next";
import RbacWrapperComponent from "../../components/rbac-wrapper/rbac-wrapper.component";
import TechLookupJobsList from "../../components/tech-lookup-jobs-list/tech-lookup-jobs-list.component";
import InstanceRenderManager from "../../utils/instanceRenderMgr";
import TechLookupJobsDrawer from "../../components/tech-lookup-jobs-drawer/tech-lookup-jobs-drawer.component";

export default function TechLookupContainer() {
  const { t } = useTranslation();

  useEffect(() => {
    document.title = t("titles.techjoblookup", {
      app: InstanceRenderManager({
        imex: "$t(titles.imexonline)",
        rome: "$t(titles.romeonline)",
        promanager: "$t(titles.promanager)"
      })
    });
  }, [t]);

  return (
    <div>
      <RbacWrapperComponent action="jobs:list-active">
        <TechLookupJobsDrawer />
        <TechLookupJobsList />
      </RbacWrapperComponent>
    </div>
  );
}
