import type { IResponse } from "@/types/response.types";

export type GeoJSONPoint = [number, number];

export type GeoJSONPolygon = {
  type: "Polygon";
  coordinates: GeoJSONPoint[][];
};

export type UpdateRestaurantType = {
  name?: string;
  menuColor?: string;
  phone?: string;
  instagram?: string;
  address?: string;
  logo?: string;
  latitude?: number;
  longitude?: number;
  description?: string;
  serviceArea?: GeoJSONPolygon;
  score?: {
    purchaseAmount: string;
    purchaseScore: string;
    scoreAmount: string;
    scoreCredit: string;
    birthdayScore: string;
    registerScore: string;
    marriageDateScore: string;
    referrerScore: string;
  };
};

export type Restaurant = {
  id: string;
  createdAt: string;
  updatedAt: string;
  deletedAt: string | null;
  name: string;
  slug: string;
  logo: string | null;
  address: string | null;
  menuColor: string | null;
  latitude: number | null;
  longitude: number | null;
  serviceArea: GeoJSONPolygon;
  isActive: boolean;
  establishedYear: number | null;
  phoneNumber: string | null;
  phone: string;
  instagram: string | null;
  telegram: string | null;
  whatsapp: string | null;
  description: string | null;
  seoTitle: string | null;
  seoDescription: string | null;
  tagNames: unknown | null;
  images: unknown | null;
  vat: number;
  domain: string;
  score: {
    scoreAmount: string;
    scoreCredit: string;
    birthdayScore: string;
    purchaseScore: string;
    referrerScore: string;
    registerScore: string;
    purchaseAmount: string;
    marriageDateScore: string;
  };
};

export type GetRestaurantResponse = IResponse<Restaurant>;
