/*
    Предрейсовые осмотры - мобильное приложение
    Стили экрана настроек
*/

//---------------------
//Подключение библиотек
//---------------------

const { StyleSheet } = require('react-native');
const { APP_COLORS } = require('../../config/theme');
const { UI } = require('../../config/appConfig');
const { responsiveSpacing } = require('../../utils/responsive');

//-----------
//Тело модуля
//-----------

const styles = StyleSheet.create({
    scrollView: {
        flex: 1
    },
    scrollContent: {
        paddingBottom: responsiveSpacing(8)
    },
    section: {
        backgroundColor: APP_COLORS.surface,
        marginTop: responsiveSpacing(4),
        marginHorizontal: UI.PADDING,
        paddingHorizontal: UI.PADDING,
        paddingVertical: responsiveSpacing(4),
        borderRadius: UI.BORDER_RADIUS,
        borderWidth: 1,
        borderColor: APP_COLORS.borderSubtle
    },
    sectionTitle: {
        marginBottom: responsiveSpacing(3)
    },
    fieldLabel: {
        marginBottom: responsiveSpacing(2),
        color: APP_COLORS.textSecondary
    },
    fieldLabelMarginTop: {
        marginTop: responsiveSpacing(4)
    },
    serverUrlRow: {
        flexDirection: 'row',
        alignItems: 'center'
    },
    serverUrlField: {
        flex: 1,
        height: UI.INPUT_HEIGHT,
        borderWidth: 1,
        borderColor: APP_COLORS.borderMedium,
        borderRadius: UI.BORDER_RADIUS,
        paddingHorizontal: responsiveSpacing(3),
        justifyContent: 'center',
        backgroundColor: APP_COLORS.surface
    },
    serverUrlFieldPressed: {
        borderColor: APP_COLORS.primary,
        backgroundColor: APP_COLORS.primaryExtraLight
    },
    serverUrlFieldDisabled: {
        backgroundColor: APP_COLORS.surfaceAlt,
        borderColor: APP_COLORS.borderSubtle
    },
    serverUrlText: {
        fontSize: UI.FONT_SIZE_MD,
        color: APP_COLORS.textPrimary
    },
    serverUrlTextDisabled: {
        color: APP_COLORS.textTertiary
    },
    serverUrlPlaceholder: {
        color: APP_COLORS.textTertiary
    },
    serverUrlCopyButton: {
        marginLeft: responsiveSpacing(2)
    },
    deviceIdField: {
        backgroundColor: APP_COLORS.surfaceAlt
    },
    helperText: {
        marginTop: responsiveSpacing(2),
        color: APP_COLORS.textTertiary
    },
    switchRow: {
        marginTop: responsiveSpacing(3)
    },
    actionButton: {
        marginTop: responsiveSpacing(3)
    },
    clearCacheButton: {
        backgroundColor: APP_COLORS.error
    },
    clearCacheButtonText: {
        color: APP_COLORS.white
    },
    resetButton: {
        backgroundColor: APP_COLORS.warning
    },
    resetButtonText: {
        color: APP_COLORS.white
    },
    optimizeButton: {
        backgroundColor: APP_COLORS.info
    },
    optimizeButtonText: {
        color: APP_COLORS.white
    },
    infoButton: {
        backgroundColor: APP_COLORS.primaryLight
    },
    infoRow: {
        flexDirection: 'row',
        justifyContent: 'space-between',
        alignItems: 'center',
        paddingVertical: responsiveSpacing(2.5),
        borderBottomWidth: StyleSheet.hairlineWidth,
        borderBottomColor: APP_COLORS.borderSubtle
    },
    infoLabel: {
        flex: 1
    },
    infoValue: {
        flex: 2,
        textAlign: 'right'
    },
    infoValueWithAction: {
        flex: 2,
        flexDirection: 'row',
        alignItems: 'center',
        justifyContent: 'flex-end'
    },
    infoValueFlex: {
        flex: 1,
        textAlign: 'right'
    },
    copyButton: {
        marginLeft: responsiveSpacing(2)
    }
});

//----------------
//Интерфейс модуля
//----------------

module.exports = styles;
