package xyz.apiote.bimba.czwek.repo

import android.content.Context
import android.graphics.drawable.Drawable
import android.net.ConnectivityManager

interface Queryable
interface Locatable {
	fun icon(context: Context, scale: Float = 1f): Drawable
	fun location(): Position
	fun id(): String
}

interface Repository {
	suspend fun getDepartures(
		cm: ConnectivityManager,
		feedID: String,
		stop: String,
		line: String?,
		context: Context
	): StopDepartures?

	suspend fun getLocatablesIn(
		cm: ConnectivityManager,
		bl: Position,
		tr: Position,
		context: Context
	): List<Locatable>?

	suspend fun getLine(
		cm: ConnectivityManager,
		feedID: String,
		line: String,
		context: Context
	): Line?

	suspend fun queryQueryables(
		cm: ConnectivityManager,
		query: String,
		context: Context
	): List<Queryable>?

	suspend fun locateQueryables(
		cm: ConnectivityManager,
		position: Position,
		context: Context
	): List<Queryable>?
}