import type { UserRole } from '@/types/auth';

export type DocCalloutVariant = 'note' | 'tip' | 'warning';

export type DocBlock =
    | { type: 'paragraph'; text: string }
    | { type: 'list'; items: string[] }
    | {
          type: 'callout';
          variant: DocCalloutVariant;
          title?: string;
          text: string;
      }
    | {
          type: 'cards';
          items: { title: string; description: string; slug?: string }[];
      };

export type DocSection = {
    id: string;
    heading: string;
    blocks: DocBlock[];
};

export type DocPage = {
    slug: string;
    title: string;
    description: string;
    roles?: UserRole[];
    relatedAppRoute?: string;
    sections: DocSection[];
};

export type DocNavItem = {
    title: string;
    slug?: string;
    roles?: UserRole[];
    children?: DocNavItem[];
};

export type DocNavGroup = {
    label: string;
    roles?: UserRole[];
    items: DocNavItem[];
};
