import { Files } from "formidable";

export interface IUser {
  email?: string;
  isLoggedIn: boolean;
  _id?: string;
  role?: string;
}

export interface LoginUser {
  email: string;
  password: string;
}

export interface PostType {
  title: string;
  text: string;
  theme: string;
  city: string;
  date: string;
  counts: number;
  _id: string;
  user: {
    _id: string;
    name: string;
    avatar: string;
  };
  file: [
    {
      _id: string;
      originalfilename: string;
      newfilename: string;
      picturepath: string;
    }
  ];
}

export interface SignupUser {
  email: string;
  name: string;
  password: string;
}

export interface Profile {
  _id: string;
  email: string;
  name: string;
  avatar: {
    originalfilename: string;
    newfilename: string;
    picturepath: string;
  };
}

export interface MainimgType {
  _id: string;
  theme: string;
  city: string;
  title: string;
  fileInfo: {
    originalfilename: string;
    newfilename: string;
  };
}
