import {StyleSheet} from 'react-native';
import {COLORS} from '@shared/colors';
import {BORDER_RADIUS, NEUTRAL_COLORS, SPACING} from '@shared/theme';
import {isIos} from '@shared/utils';

const BUTTON_BACKGROUND_COLOR = COLORS.GRAY_TWENTY_SEVEN;
export const PLAY_PAUSE_BUTTON_SIZE = 64;

export const styles = StyleSheet.create({
  flex: {flex: 1},
  previewContainer: {
    backgroundColor: COLORS.TRUE_BLACK,
    bottom: 0,
    flex: 1,
    left: 0,
    position: 'absolute',
    right: 0,
    top: 0,
  },
  sendButtonContainer: {
    gap: SPACING.x1,
    paddingHorizontal: SPACING.x2,
    width: '100%',
  },
  modalBtn: {
    alignItems: 'center',
    borderRadius: 12,
    flex: 1,
    paddingVertical: 14,
  },
  modalBtnText: {
    color: COLORS.WHITE,
    fontWeight: '700',
  },
  retake: {backgroundColor: COLORS.DARKEST_GRAY_2},
  center: {
    alignItems: 'center',
    flex: 1,
    justifyContent: 'center',
  },
  button: {
    backgroundColor: BUTTON_BACKGROUND_COLOR,
    borderRadius: 100,
    padding: 14,
    position: 'absolute',
    zIndex: 100,
  },
  bottomContainer: {
    bottom: 0,
    position: 'absolute',
    width: '100%',
  },
  inputContainer: {
    alignItems: 'center',
    backgroundColor: COLORS.WHITE,
    borderColor: COLORS.TRANSPARENT_BLACK_FOUR,
    borderRadius: BORDER_RADIUS.m,
    borderWidth: 1,
    flexDirection: 'row',
    gap: SPACING.x1,
    paddingHorizontal: SPACING['x1.5'],
    paddingVertical: isIos ? SPACING.x1 : 0,
    width: '100%',
  },
  previewImage: {flex: 1},
  playPauseButton: {
    position: 'absolute',
    zIndex: 10,
  },
  playPauseCircle: {
    alignItems: 'center',
    borderRadius: PLAY_PAUSE_BUTTON_SIZE / 2,
    height: PLAY_PAUSE_BUTTON_SIZE,
    justifyContent: 'center',
    width: PLAY_PAUSE_BUTTON_SIZE,
  },
  videoDurationText: {
    alignSelf: 'center',
    backgroundColor: BUTTON_BACKGROUND_COLOR,
    borderRadius: 100,
    color: COLORS.WHITE,
    fontSize: 14,
    fontWeight: '600',
    height: 48,
    padding: 14,
    position: 'absolute',
  },
  seekerContainer: {
    alignItems: 'center',
    flexDirection: 'row',
    gap: SPACING.x2,
    paddingHorizontal: SPACING.x2,
    position: 'absolute',
    width: '100%',
    zIndex: 10,
  },
  seekerTrack: {
    backgroundColor: COLORS.WHITE,
    borderRadius: 2,
    flex: 1,
    height: 4,
    overflow: 'hidden',
  },
  seekerProgress: {
    backgroundColor: NEUTRAL_COLORS.blue[500],
    height: '100%',
  },
  remainingTimeText: {
    color: COLORS.WHITE,
    fontSize: 14,
    fontWeight: '600',
  },
  bottomBar: {
    alignItems: 'center',
    backgroundColor: COLORS.WHITE,
    flexDirection: 'row',
    justifyContent: 'space-between',
    paddingHorizontal: SPACING.x2,
    paddingVertical: SPACING.x1,
  },
  bottomButton: {
    paddingHorizontal: SPACING.x2,
    paddingVertical: SPACING.x1,
  },
  bottomButtonText: {
    color: NEUTRAL_COLORS.blue[900],
    fontSize: 16,
    fontWeight: '600',
  },
});
