export interface UserPermissions {
  categories: {
    [key: string]: { edit: boolean; create: boolean; delete: boolean };
  };
  cities: number[];
  isAdmin: boolean;
}

export type PermissionAction = 'edit' | 'create' | 'delete';

export interface User {
  id: string;
  email: string;
  displayName: string;
  avatarUrl: string;
  bio: string;
  permissions: UserPermissions;
  isLinkedToAuthor: boolean;
}

export interface Author {
  id: string;
  email: string;
  displayName: string;
  avatarUrl: string;
  bio: string;
  order: number;
  okUrl: string;
  vkUrl: string;
  websiteUrl: string;
  articlesCount: number;
  totalLikes: number;
  userId?: string;
  isActive?: boolean;
  roles: string[];
}

export interface UserFormData {
  id: string
  email?: string;
  password?: string;
  displayName: string;
  avatarUrl: string;
}

export interface AuthorFormData {
  id: string;
  displayName: string;
  email: string;
  bio: string;
  avatarUrl: string;
  order: number;
  okUrl: string;
  vkUrl: string;
  websiteUrl: string;
  articlesCount: number;
  totalLikes: number;
  userId?: string;
  isActive: boolean;
  roles: string[];
}

