import type { WebApp } from "@twa-dev/types"

declare global {
  interface Window {
    Telegram: {
      WebApp: WebApp
    }
  }
}

interface ProjectParams {
  name: string
  description?: string
  logo?: string
  logo_as_bg: boolean
}

interface Project extends ProjectParams {
  id: number
  is_archive: boolean
  chats: number
  companies: number
  persons: number
}

interface Chat {
  id: number
  // project_id: number
  name: string
  description?: string
  logo?: string
  persons: number
  owner_id: number
}

interface CompanyParams {
  name: string
  description?: string
  address?: string
  site?: string
  phone?: string
  email?: string
  logo?: string
}

interface Company extends CompanyParams {
  id: number
  project_id: number
}

export type {
  Project,
  ProjectParams,
  Chat,
  Company,
  CompanyParams
}
