/*
 * File: LoadingOverlay.tsx
 * Description: Fullscreen loading overlay using Clinical Blue Interface design system
 * Design & Developed by Tech4Biz Solutions
 * Copyright (c) Spurrin Innovations. All rights reserved.
 */

import React from 'react';
import { View, StyleSheet, Modal } from 'react-native';
import Spinner from './Spinner';
import { Colors } from '../../theme';

interface LoadingOverlayProps {
  visible: boolean;
}

/**
 * LoadingOverlay component
 * - Shows a fullscreen spinner overlay
 */
const LoadingOverlay: React.FC<LoadingOverlayProps> = ({ visible }) => (
  <Modal visible={visible} transparent animationType="fade">
    <View style={styles.overlay}>
      <Spinner />
    </View>
  </Modal>
);

const styles = StyleSheet.create({
  overlay: {
    flex: 1,
    backgroundColor: Colors.shadow,
    alignItems: 'center',
    justifyContent: 'center',
  },
});

export default LoadingOverlay;

/*
 * End of File: LoadingOverlay.tsx
 * Design & Developed by Tech4Biz Solutions
 * Copyright (c) Spurrin Innovations. All rights reserved.
 */ 