import { Ionicons } from '@expo/vector-icons';
import React from 'react';
import { StyleSheet } from 'react-native';
import HealthDataCard from './HealthDataCard';

interface OxygenSaturationCardProps {
  resetToken: number;
  style?: object;
  oxygenSaturation?: number | null;
}

const OxygenSaturationCard: React.FC<OxygenSaturationCardProps> = ({
  resetToken,
  style,
  oxygenSaturation
}) => {
  const oxygenIcon = (
    <Ionicons name="water" size={24} color="#3B82F6" />
  );

  return (
    <HealthDataCard
      title="血氧饱和度"
      value={oxygenSaturation !== null && oxygenSaturation !== undefined ? oxygenSaturation.toFixed(1) : '--'}
      unit="%"
      icon={oxygenIcon}
      style={style}
    />
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
  },
});

export default OxygenSaturationCard;