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

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

export default OxygenSaturationCard;