import { IdParam, PagingQuery } from '../common/types'

export enum VenueSortParams {
	Id = 'id',
	Name = 'name',
	ExternalId = 'ext_id',
}
/**
 * @param query a query which searches all fields
 * @param external also search the external maps provider
 * @param coordinates used in tandem with radius
 * @param radius the geographical radius from coordinates from which results will be shown
 * @param sortBy which field to sort by
 */
export interface VenueQuery extends PagingQuery {
	query?: string
	ids?: number[]
	external?: boolean
	coordinates?: string
	radius?: number
	sortBy?: VenueSortParams
}

export interface VenueQueryWithId extends IdParam, VenueQuery {}

export interface Venue {
	id?: number
	name?: string
	description?: string
	imageUri?: string
	extId?: string
	address?: VenueAddress
}

export interface VenueAddress {
	id?: number
	firstName?: string
	lastName?: string
	street1?: string
	street2?: string
	city?: string
	zip?: string
	state?: string
	country?: string
	position?: Position
}

export interface Position {
	longitude?: number
	latitude?: number
}
