import {StyleSheet, Dimensions} from 'react-native';
import R from '../../../assets/R';

const {width: screenWidth, height: screenHeight} = Dimensions.get('window');
const HOUR_HEIGHT = 80;
const DAY_COLUMN_WIDTH = (screenWidth - 70) / 3;

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: R.colors.white,
  },
  monthPickerContainer: {
    backgroundColor: R.colors.white,
    borderBottomWidth: 1,
    borderBottomColor: R.colors.gray,
    paddingVertical: 10,
  },
  monthPickerContent: {
    paddingHorizontal: 15,
  },
  monthItem: {
    paddingHorizontal: 20,
    paddingVertical: 10,
    marginRight: 10,
    borderRadius: 20,
    backgroundColor: R.colors.gray,
  },
  monthItemSelected: {
    backgroundColor: R.colors.black,
  },
  monthItemText: {
    fontSize: R.fontsize.fontSizeLabel,
    fontFamily: R.fonts.fontRegular,
    color: R.colors.black,
  },
  monthItemTextSelected: {
    color: R.colors.white,
    fontFamily: R.fonts.fontMedium,
  },
  daysHeaderContainer: {
    flexDirection: 'row',
    backgroundColor: R.colors.grayBorderInputTextHeader,
    borderBottomWidth: 1,
    borderBottomColor: R.colors.gray2,
  },
  timeColumnHeader: {
    width: 70,
  },
  dayHeaderCell: {
    width: DAY_COLUMN_WIDTH,
    alignItems: 'center',
    justifyContent: 'center',
    borderRightWidth: 1,
    borderRightColor: R.colors.gray2,
  },
  dayHeaderText: {
    fontSize: R.fontsize.fontSizeLabel,
    fontFamily: R.fonts.fontMedium,
    color: R.colors.black,
    fontWeight: '600',
  },
  todayHeaderText: {
    color: R.colors.black,
    fontFamily: R.fonts.fontMedium,
    fontWeight: '600',
  },
  dayNumberContainer: {
    minWidth: 28,
    minHeight: 28,
    borderRadius: 15,
    alignItems: 'center',
    justifyContent: 'center',
    marginVertical: 5,
  },
  todayNumberContainer: {
    backgroundColor: R.colors.blue,
  },
  dayHeaderNumber: {
    fontSize: R.fontsize.fontSizeLabel,
    fontFamily: R.fonts.fontRegular,
    color: R.colors.black,
    fontWeight: '400',
  },
  todayHeaderNumber: {
    color: R.colors.white,
    fontFamily: R.fonts.fontMedium,
  },
  timeSlotsContainer: {
    flex: 1,
    backgroundColor: R.colors.white,
  },
  scrollContent: {},
  timelineContainer: {
    flexDirection: 'row',
    position: 'relative',
  },
  timeLabelsColumn: {
    width: 70,
    borderRightWidth: 1,
    borderRightColor: R.colors.gray2,
  },
  daysGridContainer: {
    flex: 1,
    flexDirection: 'row',
  },
  dayColumn: {
    width: DAY_COLUMN_WIDTH,
    position: 'relative',
    borderRightWidth: 1,
    borderRightColor: R.colors.gray2,
  },
  timeSlot: {
    height: HOUR_HEIGHT,
    alignItems: 'center',
    justifyContent: 'center',
    borderBottomWidth: 1,
    borderBottomColor: R.colors.gray2,
  },
  gridCell: {
    height: HOUR_HEIGHT,
    borderBottomWidth: 1,
    borderBottomColor: R.colors.gray2,
    width: '100%',
  },
  timeText: {
    fontSize: R.fontsize.fontSizeLabel,
    fontFamily: R.fonts.fontRegular,
    color: R.colors.black,
    fontWeight: '400',
  },
  eventCard: {
    borderRadius: 8,
    paddingHorizontal: 6,
    paddingVertical: 4,
  },
  eventTitle: {
    fontSize: R.fontsize.fontSizeLabel,
    fontFamily: R.fonts.fontMedium,
    color: R.colors.white,
    marginBottom: 2,
  },
  eventSubtitle: {
    fontSize: R.fontsize.fontSizeLabel,
    fontFamily: R.fonts.fontRegular,
    color: R.colors.white,
    fontWeight: '400',
  },
  eventTime: {
    fontSize: R.fontsize.fontSizeLabel,
    fontFamily: R.fonts.fontRegular,
    color: R.colors.white,
    fontWeight: '400',
  },
});

export default styles;
