// Types file defining core interfaces for the Tech4Biz client & admin portal

export type UserRole = 'CLIENT' | 'ADMIN';

export type OnboardingStatus = 
  | 'NOT_STARTED'
  | 'FORM_COMPLETED'
  | 'NDA_SIGNED'
  | 'MSA_SIGNED'
  | 'PENDING_APPROVAL'
  | 'APPROVED'
  | 'REJECTED';

export interface User {
  id: string;
  email: string;
  role: UserRole;
  companyName?: string;
  website?: string;
  sector?: string;
  companySize?: string;
  onboardingStatus: OnboardingStatus;
  mfaVerified: boolean;
  ndaSignature?: {
    type: 'draw' | 'type' | 'upload';
    dataUrl: string;
    date: string;
  };
  msaSignature?: {
    type: 'draw' | 'type' | 'upload';
    dataUrl: string;
    date: string;
  };
  createdAt: string;
  passwordHash?: string;
  defaultTheme?: string | null;
  showEcosystemTab?: boolean;
}

export interface Category {
  id: string;
  name: string; // e.g. 'Silicon', 'Software', 'AI', 'Cloud'
  subcategories: string[];
}

export interface Asset {
  id: string;
  title: string;
  description: string; // Rich text / markdown
  categoryId: string; // e.g. 'silicon'
  subcategory: string; // e.g. 'FPGA'
  tags: string[];
  author: string;
  publishDate: string;
  thumbnailUrl: string;
  bannerUrl?: string;
  downloadUrl?: string;
  githubUrl?: string;
  status: 'draft' | 'in_review' | 'published' | 'archived';
  downloadsCount: number;
}



export interface Announcement {
  id: string;
  title: string;
  content: string;
  date: string;
  severity: 'info' | 'warning' | 'success';
}

export interface OnboardingFormInput {
  companyName: string;
  website: string;
  sector: string;
  companySize: string;
}

export interface SignaturePayload {
  type: 'draw' | 'type' | 'upload';
  dataUrl: string;
}
