package com.isidroid.c23.ui.screen.render_preview.ext

import com.isidroid.c23.R
import com.isidroid.rendering.constant.PrintOrientation
import com.isidroid.rendering.constant.PrintSize

internal fun getPrintSizeIcon(@PrintSize printSize: Int) = when (printSize) {
    PrintSize.FIT_TO_PAPER -> R.drawable.ic_option_printsize_fill_to_paper
    PrintSize.FIT_TO_PRINTABLE_AREA -> R.drawable.ic_option_printsize_fit_to_printable
    PrintSize.PAPER_ORIGINAL_PAGE -> R.drawable.ic_option_printsize_actual
    PrintSize.FILL_PAGE -> R.drawable.ic_option_printsize_fill_to_paper
    else -> R.drawable.ic_option_print_size
}

internal fun getOrientationIcon(@PrintOrientation orientation: Int) = when (orientation) {
    PrintOrientation.AUTO -> R.drawable.ic_option_auto_orientation
    PrintOrientation.PORTRAIT -> R.drawable.ic_option_portrait
    PrintOrientation.LANDSCAPE -> R.drawable.ic_option_landscape
    else -> R.drawable.ic_option_auto_orientation
}


internal fun getPrintSizeTitle(@PrintSize printSize: Int) = when (printSize) {
    PrintSize.FIT_TO_PAPER -> R.string.fit_to_paper
    PrintSize.FIT_TO_PRINTABLE_AREA -> R.string.fit_to_printable_area
    PrintSize.PAPER_ORIGINAL_PAGE -> R.string.original_page
    PrintSize.FILL_PAGE -> R.string.fill_page
    else -> R.string.fit_to_paper
}

internal fun getOrientationTitle(@PrintOrientation orientation: Int) = when (orientation) {
    PrintOrientation.AUTO -> R.string.orientation_auto
    PrintOrientation.PORTRAIT -> R.string.portrait
    PrintOrientation.LANDSCAPE -> R.string.landscape
    else -> R.string.orientation_auto
}



