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

export type PaymentMethod = {
  id: string;
  createdAt: string;
  updatedAt: string;
  deletedAt: string | null;
  name: string;
  keyName: string;
  description: string;
  icon: string | null;
  isActive: boolean;
  order: number;
};

export type PaymentMethodsResponse = IResponse<PaymentMethod[]>;

export type GeoJSONPoint = [number, number];

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

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;
};

export type RestaurantPaymentMethodsResponse = IResponse<
  RestaurantPaymentMethod[]
>;

export type RestaurantPaymentMethod = {
  id: string;
  createdAt: string;
  updatedAt: string;
  deletedAt: string | null;
  restaurant: Restaurant;
  method: string;
  gateway: string;
  description: string;
  enabled: boolean;
  order: number;
  merchantId: string;
};

export type RestaurantPaymentMethodResponse = IResponse<
  RestaurantPaymentMethod
>;

export type CreateRestaurantPaymentMethodType = {
  method: string;
  gateway?: string;
  description: string;
  enabled: boolean;
  order: number;
  merchantId?: string;
};

export type GetRestaurantPaymentMethodsParams = {
  page?: number;
  limit?: number;
  search?: string;
};
