export type Globals = {
  id: string
  site_name: string
  meta_title: string
  meta_description: string
  copyright: string
}

export type MenuItem = {
  label: string
  url: string | null
  sort: number
}

export type MenuRaw = {
  id: string
  menus_menu_items: Array<{
    sort: number
    menu_items_id: MenuItem
  }>
}

export type Menu = {
  id: string
  items: MenuItem[]
}

export type PageEntity = {
  slug: string
  title: string
  content: string
}

export type Category = {
  slug: string
  name: string
  parent_id: string | null
  subcategories?: Category[]
}

export type VendorCategoryJoin = {
  categories_id: Category
}

export type VendorListItem = {
  id: string
  slug: string
  name: string
  description: string | null
  logo: string | null
}

export type Vendor = VendorListItem & {
  long_description: string | null
  address_line_1: string | null
  address_line_2: string | null
  city: string | null
  state: string | null
  country: string | null
  website: string | null
  facebook: string | null
  linkedin: string | null
  twitter: string | null
  categories: VendorCategoryJoin[]
}
