/**
 * KRA - Page Title Utility
 */
import { fmtTitle } from '@/utils/fmtRouterTitle';

const appName = 'KRA Admin';

export default function getPageTitle(
  pageTitle: string,
  route: { params?: Record<string, string>; query?: Record<string, string> }
) {
  if (pageTitle) {
    const title = fmtTitle(pageTitle, route);
    return `${title} - ${appName}`;
  }
  return `${appName}`;
}
