import { Icons } from '@/components/icons';
import type { Permission } from '@/lib/auth/permissions';
import type { BusinessRole } from '@/lib/auth/roles';

export interface PermissionCheck {
  permission?: Permission;
  anyPermissions?: Permission[];
  allPermissions?: Permission[];
  plan?: string;
  feature?: string;
  role?: string;
  businessRole?: BusinessRole;
  businessRoles?: BusinessRole[];
  systemRole?: string;
  requireOrg?: boolean;
}

export interface NavItem {
  title: string;
  url: string;
  disabled?: boolean;
  external?: boolean;
  shortcut?: [string, string];
  icon?: keyof typeof Icons;
  label?: string;
  description?: string;
  isActive?: boolean;
  items?: NavItem[];
  access?: PermissionCheck;
}

export interface NavGroup {
  label: string;
  items: NavItem[];
}

export interface NavItemWithChildren extends NavItem {
  items: NavItemWithChildren[];
}

export interface NavItemWithOptionalChildren extends NavItem {
  items?: NavItemWithChildren[];
}

export interface FooterItem {
  title: string;
  items: {
    title: string;
    href: string;
    external?: boolean;
  }[];
}

export type MainNavItem = NavItemWithOptionalChildren;

export type SidebarNavItem = NavItemWithChildren;
