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

@file:Suppress("FunctionName")

package org.dueattendant149.bookshelf.ui.settings.reader.reading_speed

import androidx.compose.foundation.lazy.LazyListScope
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.stringResource
import org.dueattendant149.bookshelf.R
import org.dueattendant149.bookshelf.ui.settings.components.SettingsSubcategory
import org.dueattendant149.bookshelf.ui.settings.reader.reading_speed.components.HighlightedReadingOption
import org.dueattendant149.bookshelf.ui.settings.reader.reading_speed.components.HighlightedReadingThicknessOption
import org.dueattendant149.bookshelf.ui.settings.reader.reading_speed.components.HorizontalLimiterDimmingOption
import org.dueattendant149.bookshelf.ui.settings.reader.reading_speed.components.HorizontalLimiterHeightOption
import org.dueattendant149.bookshelf.ui.settings.reader.reading_speed.components.HorizontalLimiterOption
import org.dueattendant149.bookshelf.ui.settings.reader.reading_speed.components.HorizontalLimiterRulerOption
import org.dueattendant149.bookshelf.ui.settings.reader.reading_speed.components.HorizontalLimiterRulerThicknessOption
import org.dueattendant149.bookshelf.ui.settings.reader.reading_speed.components.HorizontalLimiterVerticalOffsetOption
import org.dueattendant149.bookshelf.ui.settings.reader.reading_speed.components.PerceptionExpanderOption
import org.dueattendant149.bookshelf.ui.settings.reader.reading_speed.components.PerceptionExpanderPaddingOption
import org.dueattendant149.bookshelf.ui.settings.reader.reading_speed.components.PerceptionExpanderThicknessOption

fun LazyListScope.ReadingSpeedSubcategory(
    titleColor: @Composable () -> Color = { MaterialTheme.colorScheme.primary },
    title: @Composable () -> String = { stringResource(id = R.string.reading_speed_reader_settings) },
    showTitle: Boolean = true,
    showDivider: Boolean = true
) {
    SettingsSubcategory(
        titleColor = titleColor,
        title = title,
        showTitle = showTitle,
        showDivider = showDivider
    ) {
        item {
            HighlightedReadingOption()
        }

        item {
            HighlightedReadingThicknessOption()
        }

        item {
            PerceptionExpanderOption()
        }

        item {
            PerceptionExpanderPaddingOption()
        }

        item {
            PerceptionExpanderThicknessOption()
        }

        item {
            HorizontalLimiterOption()
        }

        item {
            HorizontalLimiterHeightOption()
        }

        item {
            HorizontalLimiterVerticalOffsetOption()
        }

        item {
            HorizontalLimiterRulerOption()
        }

        item {
            HorizontalLimiterRulerThicknessOption()
        }

        item {
            HorizontalLimiterDimmingOption()
        }
    }
}