package com.isidroid.c23.ui.navigation

import androidx.core.net.toUri
import com.isidroid.c23.constant.Argument

internal fun routeSelectContent() = Content.route.toUri().toString()
internal fun routePrintJobs() = PrintJobs.route.toUri().toString()

internal fun routeHome(uris: String? = null) = Home.route.toUri().buildUpon()
    .appendQueryParameter(Argument.URI, uris)
    .toString()

internal fun routeRenderPreview(uris: String = Argument.URI) = RenderPreview.route.toUri().buildUpon()
    .appendQueryParameter(Argument.URI, uris)
    .toString()

internal fun routeMap(
    lat: String? = null,
    lng: String? = null,
    spotCode: String? = null,
    uris: String? = null
) = Map.route.toUri().buildUpon()
    .appendQueryParameter(Argument.LATITUDE, lat)
    .appendQueryParameter(Argument.LONGITUDE, lng)
    .appendQueryParameter(Argument.SPOT_CODE, spotCode)
    .appendQueryParameter(Argument.URI, uris)
    .toString()

internal fun routeJobDetails(id: String = Argument.ID) = JobDetails.route.toUri().buildUpon()
    .appendQueryParameter(Argument.ID, id)
    .toString()