"use client";

import { ReactNode } from "react";
import { AppShell } from "@/components/app/AppShell";
import type { BreadcrumbLabels } from "@/lib/breadcrumbs";
import { isTeacherRole } from "@/lib/teacher";

export function TeacherShell({
  children,
  title,
  subtitle,
  showBack = true,
  breadcrumbLabels,
}: {
  children: ReactNode;
  title?: string;
  subtitle?: string;
  showBack?: boolean;
  breadcrumbLabels?: BreadcrumbLabels;
}) {
  return (
    <AppShell
      layout="teacher"
      title={title}
      subtitle={subtitle}
      showBack={showBack}
      breadcrumbLabels={breadcrumbLabels}
    >
      {children}
    </AppShell>
  );
}

export function useIsTeacherView(): boolean {
  return isTeacherRole();
}
