/*
 * Book's Story — free and open-source Material You eBook reader.
 * Copyright (C) 2024-2026 Acclorite
 * SPDX-License-Identifier: GPL-3.0-only
 */

package org.dueattendant149.bookshelf.ui.settings.reader.font.components

import androidx.compose.runtime.Composable
import androidx.compose.ui.res.stringResource
import org.dueattendant149.bookshelf.R
import org.dueattendant149.bookshelf.ui.common.components.settings.SliderWithTitle
import org.dueattendant149.bookshelf.ui.common.helpers.LocalSettings

@Composable
fun FontSizeOption() {
    val settings = LocalSettings.current

    SliderWithTitle(
        value = settings.fontSize.value to "pt",
        fromValue = 10,
        toValue = 35,
        title = stringResource(id = R.string.font_size_option),
        onValueChange = {
            settings.fontSize.update(it)
        }
    )
}