/** * Admin parent route for the email-sequence editor + dashboard * (Phase 05 Task #80, deferred follow-up). * * Renders an `` for the list / detail / stats child routes. * Permission gating happens here so all child loaders inherit the * auth check. */ import { LoaderFunctionArgs, MetaFunction, Outlet } from "react-router"; import { getTranslations } from "~/locale/i18next.server"; import { verifyUserHasPermission } from "~/utils/helpers/.server/PermissionsService"; type LoaderData = { title: string; }; export const loader = async ({ request }: LoaderFunctionArgs) => { await verifyUserHasPermission(request, "admin.marketing.leads.view"); const { t } = await getTranslations(request); const title = (t("admin.emailSequences.title") as string) || "Email Sequences"; const data: LoaderData = { title: `${title} | ${process.env.APP_NAME}`, }; return data; }; export const meta: MetaFunction = ({ data }) => [{ title: data?.title }]; export default function EmailSequencesLayout() { return ; }