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

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

const { StyleSheet } = require('react-native'); //StyleSheet React Native
const { APP_COLORS } = require('../../config/theme'); //Цветовая схема приложения
const { UI } = require('../../config/appConfig'); //Конфигурация UI

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

//Стили меню
const styles = StyleSheet.create({
    backdrop: {
        position: 'absolute',
        top: 0,
        left: 0,
        right: 0,
        bottom: 0,
        backgroundColor: APP_COLORS.overlay,
        zIndex: 999
    },
    container: {
        position: 'absolute',
        top: 0,
        right: 0,
        bottom: 0,
        width: UI.SIDE_MENU_WIDTH,
        backgroundColor: APP_COLORS.surface,
        zIndex: 1000,
        shadowColor: APP_COLORS.black,
        shadowOpacity: 0.15,
        shadowRadius: 10,
        shadowOffset: {
            width: -2,
            height: 0
        },
        elevation: 10
    },
    header: {
        paddingHorizontal: UI.PADDING,
        paddingVertical: UI.PADDING,
        borderBottomWidth: StyleSheet.hairlineWidth,
        borderBottomColor: APP_COLORS.borderSubtle,
        backgroundColor: APP_COLORS.primaryLight,
        height: 60,
        justifyContent: 'center'
    },
    title: {
        fontSize: 18,
        fontWeight: '600',
        color: APP_COLORS.primaryDark,
        textAlign: 'center'
    },
    content: {
        flex: 1,
        paddingTop: UI.PADDING / 2
    },
    menuItem: {
        paddingHorizontal: UI.PADDING,
        paddingVertical: UI.PADDING,
        borderBottomWidth: StyleSheet.hairlineWidth,
        borderBottomColor: APP_COLORS.borderSubtle
    },
    menuItemPressed: {
        backgroundColor: APP_COLORS.primaryLight
    },
    menuItemDestructive: {
        borderBottomColor: APP_COLORS.error + '20'
    },
    menuItemContent: {
        flexDirection: 'row',
        alignItems: 'center'
    },
    menuItemIcon: {
        marginRight: 12,
        width: 24,
        alignItems: 'center'
    },
    menuItemText: {
        fontSize: 16,
        color: APP_COLORS.textPrimary
    },
    menuItemTextDestructive: {
        color: APP_COLORS.error
    },
    emptyMenu: {
        padding: UI.PADDING * 2,
        alignItems: 'center',
        justifyContent: 'center'
    },
    emptyMenuText: {
        fontSize: 14,
        color: APP_COLORS.textSecondary,
        textAlign: 'center'
    }
});

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

module.exports = styles;
